-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeath_screen.py
More file actions
25 lines (23 loc) · 1011 Bytes
/
death_screen.py
File metadata and controls
25 lines (23 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import pygame
import game_process
import menu
def death_screen(surface, screen_height, fps, clock, point):
death_ground = pygame.image.load('death_ground.jpeg').convert()
done = False
while not done:
clock.tick(fps)
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
quit()
if event.type == pygame.KEYDOWN:
keystate = pygame.key.get_pressed()
if keystate[pygame.K_SPACE]:
game_process.game_process(surface, 480, 640, fps, clock)
if keystate[pygame.K_BACKSPACE]:
menu.menu_screen(surface, 480, 640, 120, clock)
surface.fill((0, 0, 0))
pygame.draw.rect(surface, (255, 255, 255), [500, 0, 230, screen_height], width=1)
surface.blit(death_ground, (0, 0))
game_process.print_text(surface, 'Result -- ' + str(point), 520, 20, 24)
pygame.display.flip()