mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-10 03:59:26 +02:00
fixed buggy bug
This commit is contained in:
@@ -220,8 +220,7 @@ public class HudUi {
|
||||
|
||||
public void addBars(){
|
||||
bars.clear();
|
||||
bars.add(
|
||||
new SBar(
|
||||
bars.add(new SBar(
|
||||
() -> {
|
||||
float hp = 0f;
|
||||
if(getUnit() instanceof Healthc) hp = Mathf.round(((Healthc)getUnit()).health(), 1);
|
||||
@@ -234,8 +233,7 @@ public class HudUi {
|
||||
if(getUnit() instanceof Healthc) hp = ((Healthc)getUnit()).healthf();
|
||||
return Mathf.clamp(hp);
|
||||
}
|
||||
)
|
||||
);
|
||||
));
|
||||
bars.add(new SBar(
|
||||
() -> {
|
||||
if(getUnit() instanceof BlockUnitUnit && ((BlockUnitUnit)getUnit()).tile() instanceof Turret.TurretBuild) {
|
||||
@@ -521,8 +519,9 @@ public class HudUi {
|
||||
t.add(new Image(){
|
||||
{
|
||||
update(() -> {
|
||||
if(getUnit() instanceof Unit && ((((Unit)getUnit()).stack().item == null || ((Unit)getUnit()).stack().amount <= 0)))
|
||||
if(getUnit() instanceof Unit && ((Unit)getUnit()).stack().item != null && ((Unit)getUnit()).stack.amount > 0)
|
||||
setDrawable(((Unit)getUnit()).stack().item.uiIcon);
|
||||
else setDrawable(Core.atlas.find("clear"));
|
||||
});
|
||||
}
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user