v1.2.0: fixed attack indicator sprites appearing in top-left for 1 frame

This commit is contained in:
Evan Debenham 2022-02-23 14:31:53 -05:00
parent 755130b91d
commit f200022dfa

View File

@ -91,12 +91,14 @@ public class AttackIndicator extends Tag {
super.update();
if (!bg.visible){
if (sprite != null) sprite.visible = false;
enable(false);
if (delay > 0f) delay -= Game.elapsed;
if (delay <= 0f) active = false;
} else {
delay = 0.75f;
active = true;
if (bg.width > 0 && sprite != null)sprite.visible = true;
if (Dungeon.hero.isAlive()) {
@ -168,9 +170,6 @@ public class AttackIndicator extends Tag {
private synchronized void visible( boolean value ) {
bg.visible = value;
if (sprite != null) {
sprite.visible = value;
}
}
@Override