Some visual tweaks

This commit is contained in:
Anuken
2022-01-09 19:08:35 -05:00
parent b31098ed87
commit feb1135bcc
11 changed files with 23 additions and 4 deletions

View File

@@ -77,6 +77,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
ConsumeModule cons;
public transient float healSuppressionTime = -1f;
public transient float lastHealTime = -120f * 10f;
private transient float timeScale = 1f, timeScaleDuration;
private transient float dumpAccum;
@@ -339,6 +340,14 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
return Time.time <= healSuppressionTime;
}
public void recentlyHealed(){
lastHealTime = Time.time;
}
public boolean wasRecentlyHealed(float duration){
return lastHealTime + duration >= Time.time;
}
public Building nearby(int dx, int dy){
return world.build(tile.x + dx, tile.y + dy);
}