heal anim

This commit is contained in:
Martin
2022-12-20 13:43:44 +01:00
parent dbb55957a0
commit edc3545c02
4 changed files with 13 additions and 8 deletions

View File

@@ -28,12 +28,12 @@ export class UnitHealth {
public heal(points: number): void {
this.healthPoints = Math.min(this.maxHealthPoints, this.healthPoints + points);
this.healthPointsChangeEvent.trigger(this.healthPoints);
this.healthPointsChangeEvent.trigger(points);
}
public damage(points: number): void {
this.healthPoints -= points;
this.healthPointsChangeEvent.trigger(this.healthPoints);
this.healthPointsChangeEvent.trigger(-points);
}
public setMaxHealth(maxHealth: number): void {