Ground support unit implementations

This commit is contained in:
Anuken
2020-07-10 12:14:24 -04:00
parent f39702e1cc
commit baa9f22a0b
35 changed files with 1267 additions and 1106 deletions

View File

@@ -93,8 +93,14 @@ abstract class HealthComp implements Entityc{
health = Mathf.clamp(health, 0, maxHealth);
}
/** Heals by a flat amount. */
void heal(float amount){
health += amount;
clampHealth();
}
/** Heals by a 0-1 fraction of max health. */
void healFract(float amount){
heal(amount * maxHealth);
}
}