v0.9.2b: hero now plays the flying animation while idling and levitating

This commit is contained in:
Evan Debenham 2021-03-16 18:25:47 -04:00
parent b2fefa256f
commit 96b25f8522

View File

@ -102,12 +102,20 @@ public class HeroSprite extends CharSprite {
@Override
public void move( int from, int to ) {
super.move( from, to );
if (ch.flying) {
if (ch != null && ch.flying) {
play( fly );
}
Camera.main.panFollow(this, 20f);
}
@Override
public void idle() {
super.idle();
if (ch != null && ch.flying) {
play( fly );
}
}
@Override
public void jump( int from, int to, Callback callback ) {
super.jump( from, to, callback );