v0.9.1c: improved animation autocomplete when charsprites are paused
This commit is contained in:
parent
b4c2f71daa
commit
6e76071113
core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites
|
@ -75,7 +75,6 @@ public class BlacksmithSprite extends MobSprite {
|
|||
public void onComplete( Animation anim ) {
|
||||
super.onComplete( anim );
|
||||
|
||||
//FIXME should figure out why onComplete is called constantly when an animation is paused
|
||||
if (visible && emitter != null && anim == idle) {
|
||||
emitter.burst( Speck.factory( Speck.FORGE ), 3 );
|
||||
float volume = 0.2f / (Dungeon.level.distance( ch.pos, Dungeon.hero.pos ));
|
||||
|
|
|
@ -482,8 +482,10 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
|
|||
|
||||
@Override
|
||||
public void update() {
|
||||
if (paused && curAnim == die){
|
||||
paused = false;
|
||||
if (paused && !looping()){
|
||||
Animation cur = curAnim;
|
||||
curAnim = null;
|
||||
listener.onComplete(cur);
|
||||
}
|
||||
|
||||
super.update();
|
||||
|
|
Loading…
Reference in New Issue
Block a user