add start button

This commit is contained in:
Waylon Walker 2023-01-15 12:17:01 -06:00
parent db4f2ae64b
commit 8b1dfad72a
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4
2 changed files with 69 additions and 7 deletions

View file

@ -4,6 +4,7 @@ import pygame
class Game:
def __init__(self):
pygame.init()
# pygame.mouse.set_visible(False)
pygame.mixer.init()
pygame.display.set_caption(__file__)
@ -18,6 +19,7 @@ class Game:
self.running = True
self.surfs = []
self.elapsed = 0
self.frames = 0
def should_quit(self):
for event in self.events:
@ -42,6 +44,7 @@ class Game:
pygame.blit(surf)
pygame.display.update()
self.elapsed = self.clock.tick(60) / 100
self.frames += 1
pygame.quit()