v0.2.3: fixed various UI bugs
This commit is contained in:
parent
5bf2d72a90
commit
92c018ac44
|
@ -409,7 +409,7 @@ public class Hero extends Char {
|
|||
}
|
||||
|
||||
checkVisibleMobs();
|
||||
AttackIndicator.updateState();
|
||||
|
||||
|
||||
if (curAction == null) {
|
||||
|
||||
|
@ -496,6 +496,8 @@ public class Hero extends Char {
|
|||
damageInterrupt = true;
|
||||
ready = true;
|
||||
|
||||
AttackIndicator.updateState();
|
||||
|
||||
GameScene.ready();
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,11 @@ public class AttackIndicator extends Tag {
|
|||
public void update() {
|
||||
super.update();
|
||||
|
||||
if (!Dungeon.hero.isAlive()) {
|
||||
if (Dungeon.hero.isAlive()) {
|
||||
|
||||
enable(Dungeon.hero.ready);
|
||||
|
||||
} else {
|
||||
visible( false );
|
||||
enable( false );
|
||||
}
|
||||
|
@ -129,6 +133,7 @@ public class AttackIndicator extends Tag {
|
|||
private boolean enabled = true;
|
||||
private void enable( boolean value ) {
|
||||
enabled = value;
|
||||
active = value;
|
||||
if (sprite != null) {
|
||||
sprite.alpha( value ? ENABLED : DISABLED );
|
||||
}
|
||||
|
@ -143,10 +148,9 @@ public class AttackIndicator extends Tag {
|
|||
|
||||
@Override
|
||||
protected void onClick() {
|
||||
if (Dungeon.hero.curAction != null)
|
||||
Dungeon.hero.interrupt();
|
||||
else
|
||||
Dungeon.hero.handle( lastTarget.pos );
|
||||
if (enabled) {
|
||||
Dungeon.hero.handle( lastTarget.pos );
|
||||
}
|
||||
}
|
||||
|
||||
public static void target( Char target ) {
|
||||
|
|
|
@ -98,7 +98,9 @@ public class DangerIndicator extends Tag {
|
|||
|
||||
HealthIndicator.instance.target( target == HealthIndicator.instance.target() ? null : target );
|
||||
|
||||
Camera.main.target = null;
|
||||
Camera.main.focusOn( target.sprite );
|
||||
if (Dungeon.hero.curAction == null) {
|
||||
Camera.main.target = null;
|
||||
Camera.main.focusOn(target.sprite);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user