From ed3d72350b52846f15cf464d070c4be4533af4e2 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 3 Nov 2025 05:48:59 +0200 Subject: [PATCH] jjj --- main.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/main.py b/main.py index 4b4376b..a719824 100644 --- a/main.py +++ b/main.py @@ -12,6 +12,8 @@ from pygame.locals import ( K_ESCAPE, KEYDOWN, QUIT, + K_SPACE, + K_f, ) pygame.mixer.init() @@ -50,6 +52,28 @@ bg =pygame.image.load("sprites/Graveyard.png").convert() clock = pygame.time.Clock() +while Start: + for event in pygame.event.get(): + if event.type==KEYDOWN: + if event.type==K_SPACE: + Start = False + if event.key ==K_f: + Start = False + elif event.type == QUIT: + Start = False + screen.fill((0,0,0)) + text= my_font.render("Start",True,(255,255,255)) + screen.blit(text,( + (SCREEN_WIDTH-text.get_width())/2, + (SCREEN_HEIGHT-text.get_height())/2 + )) + text = my_font.render("Press Space", True, (255,255,255)) + screen.blit(text, ( + (SCREEN_WIDTH-text.get_width())/2 + (SCREEN_HEIGHT-text.get_height()-200) + )) + pygame.display.flip() + clock.tick(1000) while running: screen.blit(bg, (0,0))