MCPcopy Index your code
hub / github.com/geekcomputers/Python / victory_screen

Function victory_screen

Street_Fighter/src/main.py:131–158  ·  view source on GitHub ↗
(winner_img)

Source from the content-addressed store, hash-verified

129
130
131def victory_screen(winner_img):
132 start_time = pygame.time.get_ticks()
133 while pygame.time.get_ticks() - start_time < ROUND_OVER_COOLDOWN:
134 resized_victory_img = pygame.transform.scale(
135 victory_img, (victory_img.get_width() * 2, victory_img.get_height() * 2)
136 )
137 screen.blit(
138 resized_victory_img,
139 (
140 SCREEN_WIDTH // 2 - resized_victory_img.get_width() // 2,
141 SCREEN_HEIGHT // 2 - resized_victory_img.get_height() // 2 - 50,
142 ),
143 )
144
145 screen.blit(
146 winner_img,
147 (
148 SCREEN_WIDTH // 2 - winner_img.get_width() // 2,
149 SCREEN_HEIGHT // 2 - winner_img.get_height() // 2 + 100,
150 ),
151 )
152
153 pygame.display.update()
154
155 for event in pygame.event.get():
156 if event.type == pygame.QUIT:
157 pygame.quit()
158 exit()
159
160
161def draw_gradient_text(text, font, x, y, colors):

Callers 1

game_loopFunction · 0.85

Calls 3

exitFunction · 0.85
updateMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected