扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
本文为大家分享了pygame游戏之旅的第13篇,供大家参考,具体内容如下
定义暂停函数:
def paused(): largeText = pygame.font.SysFont('comicsansms',115) TextSurf, TextRect = text_objects('Paused', largeText) TextRect.center = ((display_width/2),(display_height/2)) gameDisplay.blit(TextSurf, TextRect) while pause: for event in pygame.event.get(): print(event) if event.type == pygame.QUIT: pygame.quit() quit() ## gameDisplay.fill(white) button("Continue", 150, 450, 100, 50, green, bright_green,game_loop) button("Quit",550, 450, 100, 50, red, bright_red,quitgame) pygame.display.update() clock.tick(15)
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流