summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authoryuzu-eva <stevenhu@web.de>2024-09-20 17:21:09 +0200
committeryuzu-eva <stevenhu@web.de>2024-09-20 17:21:09 +0200
commit6b3eda2ad197d2bd9d434f820f682f13e71c8fbb (patch)
tree87f7e5fc451c613082523f088ac4c8d604c9df75 /main.py
parent9e795071dc9aca96e513bf37ac941b0fe4aeccba (diff)
render shapes and add rotation
Diffstat (limited to 'main.py')
-rw-r--r--main.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/main.py b/main.py
index e91ba28..bd59cfc 100644
--- a/main.py
+++ b/main.py
@@ -1,15 +1,23 @@
import pygame
from constants import *
+from circleshape import *
+from player import *
def main():
pygame.init()
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
+ clock = pygame.time.Clock()
+ dt = 0
+ player = Player(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2)
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
return
screen.fill("black")
+ player.update(dt)
+ player.draw(screen)
pygame.display.flip()
+ dt = clock.tick(60) / 1000
if __name__ == "__main__":
main()