How to stop an animation when it's done in python?
How to stop an animation when it's done in python and play other animation?
How to stop an animation when it's done in python and play other animation?
sprite.fps = 0
Create a class that has fields x
, y
, sprite_walk
, sprite_run
, sprite_stop
, sprite_current
.
You assign the currently playing sprite to the sprite_current variable.
if run then sprite_current = sprite_run
in the drawing function for the class
screen.drawSrpite( sprite_current, x, y, ...... )