38 lines
856 B
C#
38 lines
856 B
C#
using UnityEngine;
|
|
|
|
namespace GameDev.CoreSystems
|
|
{
|
|
public interface IDamageable
|
|
{
|
|
#region Methods
|
|
|
|
/// <summary>
|
|
/// Modify the health of the damageable
|
|
/// </summary>
|
|
/// <param name="healthChange">Amount of health change</param>
|
|
/// <param name="source">Source GameObject, used to modify stats of the source. Total kills, etc.</param>
|
|
public void ModifyHealth(int healthChange, GameObject source);
|
|
|
|
#endregion
|
|
|
|
#region Setters
|
|
|
|
public void SetCurrentHealth(int newHealth);
|
|
|
|
public void SetMaxHealth(int newHealth);
|
|
|
|
public void SetInvulnerable(bool newState);
|
|
|
|
#endregion
|
|
|
|
#region Getters
|
|
|
|
public int GetCurrentHealth();
|
|
|
|
public int GetMaxHealth();
|
|
|
|
public float GetHealthFactor();
|
|
|
|
#endregion
|
|
}
|
|
} |