Skip to content
Advertisement

Pygame delete non sprite objects

So Im trying to make an upward scrolling platformer, and I need a way to delete the score counter and hide the death screen when a player dies and restarts. However, those objects aren’t sprites. Is there still a way to delete them?

Advertisement

Answer

this is just an example because you have not provided any code :'(

if not ondeathscreen:
     #draw your deathscreen
if not inGame:
     #draw your score counter

you have to personilize this code with your game but hopefully it helps :))).

Advertisement