(self, text, color=COLOR_WHITE, seconds=2.0)
| 232 | self.surface = pygame.Surface(self.dim) |
| 233 | |
| 234 | def set_text(self, text, color=COLOR_WHITE, seconds=2.0): |
| 235 | text_texture = self.font.render(text, True, color) |
| 236 | self.surface = pygame.Surface(self.dim) |
| 237 | self.seconds_left = seconds |
| 238 | self.surface.fill(COLOR_BLACK) |
| 239 | self.surface.blit(text_texture, (10, 11)) |
| 240 | |
| 241 | def tick(self, clock): |
| 242 | delta_seconds = 1e-3 * clock.get_time() |