How To Clear Text On A Window In Pygame
In my game That I am making. I am trying to resolve this problem that I Have with the game over screen. the problem is when you die it says 'You died' then I put 'Play again' or 'Q
Solution 1:
Thank you guys for the tips as you said I should have just set the variables to their original conditions. Like this
def respawn():
global dead
global run
global velotimeser
global timeForLevel
global font
global man
global zombie
global zombie1
global randomside
global gunCapacity
global points
global powerMeter
global bullets
global intro
dead = False
velotimeser = 1
timeForLevel = 0
font = pygame.font.SysFont('comicsans', 30, True)
man = Player(300, 508, 64, 64)
zombie = Enemy(100, 508, 64, 64, 450)
zombie1 = Enemy1(100, 508, 64, 64, 450)
randomside = 0
gunCapacity = 1
points = 0
powerMeter = 0
bullets = []
intro = False
pygame.mixer.music.play(-1)
run = True
Post a Comment for "How To Clear Text On A Window In Pygame"