in the CLOCK section of the introduction
def on_mouse_down(pos):
if alien.collidepoint(pos):
sounds.eep.play()
alien.image = 'alien_hurt'
time.sleep(1)
alien.image = 'alien'
the image doesnt change on screen. If I move to the next section with def set_alien_hurt(): the image does change. I'm guessing there is no re-draw in the event code until it returns? Running this through Thonny with pgzrun.go()
in the CLOCK section of the introduction def on_mouse_down(pos): if alien.collidepoint(pos): sounds.eep.play() alien.image = 'alien_hurt' time.sleep(1) alien.image = 'alien' the image doesnt change on screen. If I move to the next section with def set_alien_hurt(): the image does change. I'm guessing there is no re-draw in the event code until it returns? Running this through Thonny with pgzrun.go()