Skip to content

Commit 573b7f0

Browse files
committed
Change warning text; reduce time text is on screen
1 parent 5e7b714 commit 573b7f0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pygame1_smallguy/small_guy_game.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,21 +89,21 @@ def hit(self):
8989
self.x = 60
9090
self.y = 410
9191
self.walkCount = 0
92-
textCollide = pygame.font.SysFont("comicsans", 100)
93-
text = textCollide.render("-5", 1, (255, 0, 0))
92+
textCollide = pygame.font.SysFont("comicsans", 40)
93+
text = textCollide.render("You collided! -5 hits", 1, (255, 0, 0))
9494
# text has to be in center: calculate center of screen minus half of textwidth
9595
# the 200 for the height is a bit random (screenheight is 480 here)
9696
win.blit(text, ((500/2) - (text.get_width()/2), 200))
9797
pygame.display.update()
9898
# to see the text we need to pause the game for a bit BUT it has to still be
9999
# possible to quit the game:
100100
i = 0
101-
while i < 300:
102-
pygame.time.delay(10)
101+
while i < 200:
102+
pygame.time.delay(5)
103103
i += 1
104104
for event in pygame.event.get():
105105
if event.type == pygame.QUIT:
106-
i = 301
106+
i = 201
107107
pygame.quit()
108108

109109
class projectile(object):
@@ -225,7 +225,7 @@ def redrawGameWindow():
225225
bullets = []
226226
shootLoop = 0
227227
running = True
228-
playSeconds = 15
228+
playSeconds = 20
229229

230230
while running:
231231

0 commit comments

Comments
 (0)