Turret ammo display
This commit is contained in:
@@ -71,6 +71,10 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
|
|||||||
return unit.icon();
|
return unit.icon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean displayAmmo(){
|
||||||
|
return unit instanceof BlockUnitc || state.rules.unitAmmo;
|
||||||
|
}
|
||||||
|
|
||||||
public void reset(){
|
public void reset(){
|
||||||
team = state.rules.defaultTeam;
|
team = state.rules.defaultTeam;
|
||||||
admin = typing = false;
|
admin = typing = false;
|
||||||
|
|||||||
@@ -714,8 +714,8 @@ public class HudFragment extends Fragment{
|
|||||||
|
|
||||||
t.add(new Bar(() -> player.unit().healthf(), true)).width(bw).growY().padRight(pad);
|
t.add(new Bar(() -> player.unit().healthf(), true)).width(bw).growY().padRight(pad);
|
||||||
t.image(() -> player.icon()).scaling(Scaling.bounded).grow();
|
t.image(() -> player.icon()).scaling(Scaling.bounded).grow();
|
||||||
t.add(new Bar(() -> player.dead() ? 0f : state.rules.unitAmmo ? player.unit().ammof() : player.unit().healthf(), false)).width(bw).growY().padLeft(pad).update(b -> {
|
t.add(new Bar(() -> player.dead() ? 0f : player.displayAmmo() ? player.unit().ammof() : player.unit().healthf(), false)).width(bw).growY().padLeft(pad).update(b -> {
|
||||||
b.color.set(state.rules.unitAmmo ? Pal.ammo : Pal.health);
|
b.color.set(player.displayAmmo() ? Pal.ammo : Pal.health);
|
||||||
});
|
});
|
||||||
})).size(120f, 80).padRight(4);
|
})).size(120f, 80).padRight(4);
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=51e2cc4cdbb7868b315ed9187f2475a4870be3fd
|
archash=f47e6ce55af4da9be1dd4061aa80bf9c681735fa
|
||||||
|
|||||||
Reference in New Issue
Block a user