Reputation: 21
I'm a beginning game programmer, and I'm learning how to use AndEngine for Android. I'm trying to get a sprite to fall down the screen, and jump upwards when touched by the user. Any ideas on how to do this? I'm open to using other engines if that would make it easier.
Thanks!
Upvotes: 2
Views: 1331
Reputation: 1413
You also could register a PhysicsHandler
on the sprite to make it fall and override the sprite's onAreaTouched
. Also don't forget to register the sprite as the touch area on the scene.
Upvotes: 0
Reputation: 9115
Use EntityModifier
s. MoveYModifier
could be used to move an entity across the Y axis (Either for falling, or jumping). Try it out.
These 2 questions may help: Using PathModifier or MoveYModifier to simulate sprite jumping and Making a sprite jump when user taps on the screen?
Upvotes: 2