()
| 67 | clock.tick(15) |
| 68 | |
| 69 | def pause(): |
| 70 | |
| 71 | paused=True |
| 72 | |
| 73 | message_to_screen("Paused",black,-100,size="large") |
| 74 | message_to_screen("Press C to continue or Q to quit",black,25) |
| 75 | |
| 76 | pygame.display.update() |
| 77 | |
| 78 | while paused: |
| 79 | for event in pygame.event.get(): |
| 80 | if event.type==pygame.QUIT: |
| 81 | pygame.quit() |
| 82 | quit() |
| 83 | if event.type==pygame.KEYDOWN: |
| 84 | if event.key==pygame.K_c: |
| 85 | paused=False |
| 86 | elif event.key==pygame.K_q: |
| 87 | pygame.quit() |
| 88 | quit() |
| 89 | |
| 90 | clock.tick(5) |
| 91 | |
| 92 | def score(score): |
| 93 |