Hi. I have "Player" sprite (spaceship), with touch control. "Player" move only up or down. And two "walls", up and down.
I have not any screen button.
If Touch - Is in touch, Player Set Y to clamp(Touch.Y, WallTop.Y+Player.Height/2, WallDown.Y-Player.Height/2)
I want add animation to Player, when Player moving Up ("Up" animation), when idle ("Idle" animation), and when moving down - "down" animation.
How can I do that? Thank you for help