22 lines
406 B
C#
22 lines
406 B
C#
using System;
|
|
|
|
public interface IDamageable
|
|
{
|
|
public float CurrentHealth();
|
|
public float MaximumHealth();
|
|
public void InflictDamage(float damageValue);
|
|
public void ReplenishHealth(float healValue);
|
|
public void SetHealth(float totalValue);
|
|
public bool IsKilled()
|
|
{
|
|
if (CurrentHealth() <= 0)
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
public void ResetHealth()
|
|
{
|
|
SetHealth(MaximumHealth());
|
|
}
|
|
} |