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();
|
checkVisibleMobs();
|
||||||
AttackIndicator.updateState();
|
|
||||||
|
|
||||||
if (curAction == null) {
|
if (curAction == null) {
|
||||||
|
|
||||||
|
@ -495,6 +495,8 @@ public class Hero extends Char {
|
||||||
curAction = null;
|
curAction = null;
|
||||||
damageInterrupt = true;
|
damageInterrupt = true;
|
||||||
ready = true;
|
ready = true;
|
||||||
|
|
||||||
|
AttackIndicator.updateState();
|
||||||
|
|
||||||
GameScene.ready();
|
GameScene.ready();
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,11 @@ public class AttackIndicator extends Tag {
|
||||||
public void update() {
|
public void update() {
|
||||||
super.update();
|
super.update();
|
||||||
|
|
||||||
if (!Dungeon.hero.isAlive()) {
|
if (Dungeon.hero.isAlive()) {
|
||||||
|
|
||||||
|
enable(Dungeon.hero.ready);
|
||||||
|
|
||||||
|
} else {
|
||||||
visible( false );
|
visible( false );
|
||||||
enable( false );
|
enable( false );
|
||||||
}
|
}
|
||||||
|
@ -129,6 +133,7 @@ public class AttackIndicator extends Tag {
|
||||||
private boolean enabled = true;
|
private boolean enabled = true;
|
||||||
private void enable( boolean value ) {
|
private void enable( boolean value ) {
|
||||||
enabled = value;
|
enabled = value;
|
||||||
|
active = value;
|
||||||
if (sprite != null) {
|
if (sprite != null) {
|
||||||
sprite.alpha( value ? ENABLED : DISABLED );
|
sprite.alpha( value ? ENABLED : DISABLED );
|
||||||
}
|
}
|
||||||
|
@ -143,10 +148,9 @@ public class AttackIndicator extends Tag {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onClick() {
|
protected void onClick() {
|
||||||
if (Dungeon.hero.curAction != null)
|
if (enabled) {
|
||||||
Dungeon.hero.interrupt();
|
Dungeon.hero.handle( lastTarget.pos );
|
||||||
else
|
}
|
||||||
Dungeon.hero.handle( lastTarget.pos );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void target( Char target ) {
|
public static void target( Char target ) {
|
||||||
|
|
|
@ -98,7 +98,9 @@ public class DangerIndicator extends Tag {
|
||||||
|
|
||||||
HealthIndicator.instance.target( target == HealthIndicator.instance.target() ? null : target );
|
HealthIndicator.instance.target( target == HealthIndicator.instance.target() ? null : target );
|
||||||
|
|
||||||
Camera.main.target = null;
|
if (Dungeon.hero.curAction == null) {
|
||||||
Camera.main.focusOn( target.sprite );
|
Camera.main.target = null;
|
||||||
|
Camera.main.focusOn(target.sprite);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user