Discord
Login
Community
DARK THEME

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?

  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, ...... )

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community