📜  如何在 pygame 中删除文本 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:27.318000             🧑  作者: Mango

代码示例1
screen = pygame.display.get_surface()
font = pygame.font.Font(None, 40)

font_surface = font.render("original", True, pygame.Color("white"));
screen.blit(surface, (0, 0))

screen.fill(pygame.Color("black")) # erases the entire screen surface
font_surface = font.render("edited", True, pygame.Color("white"));
screen.blit(surface, (0, 0))