let mechs override drawStats and do custom power cell stuff (#1309)

* let mechs override drawStats and do custom power cell stuff

* Update Player.java

* Update Mech.java

* Update Player.java
This commit is contained in:
DeltaNedas
2020-01-07 14:30:18 +00:00
committed by Anuken
parent 81602dc3d5
commit b0d65dcedb
2 changed files with 33 additions and 6 deletions

View File

@@ -350,13 +350,13 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
Draw.reset();
}
public void drawBackItems(){
drawBackItems(itemtime, isLocal);
}
@Override
public void drawStats(){
Draw.color(Color.black, team.color, healthf() + Mathf.absin(Time.time(), healthf() * 5f, 1f - healthf()));
Draw.rect(getPowerCellRegion(), x + Angles.trnsx(rotation, mech.cellTrnsY, 0f), y + Angles.trnsy(rotation, mech.cellTrnsY, 0f), rotation - 90);
Draw.reset();
drawBackItems(itemtime, isLocal);
drawLight();
mech.drawStats(this);
}
@Override