TORONTO KIDS COMPUTER CLUB | PMCA Saturday 18:30 Python Homework 20.08.29.
18256
post-template-default,single,single-post,postid-18256,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

PMCA Saturday 18:30 Python Homework 20.08.29.

04 Sep PMCA Saturday 18:30 Python Homework 20.08.29.

Question:

Design the game over screen as below:

Remember below is how we create texts:

gameOverFont = pygame.font.Font(None, 80)
gameOverText = "Game Over"
gameOverSurf = gameOverFont.render(gameOverText, 1, (255, 0, 0))
screen.blitgameOverSurf, [160, 200])

Please modify the below if statement in the code to display the game over screen:

if is_game_over == True:
    # add a text that show game over, your score is this and you killed
    # this many enemies
    screen.fill([0,0,0]) # change the color to black

    #####
    # create the game over screen here
    #####

    pygame.display.flip()
    clock.tick(30)
    continue

Finally the link to the code is
https://paste.ubuntu.com/p/YQ9jnzsHwW/

No Comments

Sorry, the comment form is closed at this time.