Updates the unit as if it has attacked, and increases the attack heat. Returns the damage done.
(&mut self)
| 533 | /// Updates the unit as if it has attacked, and increases the attack heat. |
| 534 | /// Returns the damage done. |
| 535 | pub(crate) fn use_attack(&mut self) -> i32 { |
| 536 | self.attack_heat += self.attack_cooldown; |
| 537 | self.damage |
| 538 | } |
| 539 | |
| 540 | /// Take the amount of damage given, returning true if the unit has died. |
| 541 | /// Returns false if the unit is still alive. |