From 6b3eda2ad197d2bd9d434f820f682f13e71c8fbb Mon Sep 17 00:00:00 2001 From: yuzu-eva Date: Fri, 20 Sep 2024 17:21:09 +0200 Subject: render shapes and add rotation --- main.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'main.py') 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() -- cgit v1.2.3