Interface IHealth
- Namespace
- S1API.Entities.Interfaces
- Assembly
- S1API.dll
Represents an entity that has health associated.
public interface IHealth
- Extension Methods
Properties
CurrentHealth
The current health of the entity.
float CurrentHealth { get; }
Property Value
IsDead
Whether the entity is dead or not.
bool IsDead { get; }
Property Value
IsInvincible
Whether the entity is invincible.
bool IsInvincible { get; set; }
Property Value
MaxHealth
The max health of the entity.
float MaxHealth { get; set; }
Property Value
Methods
Damage(int)
Deals damage to the entity.
void Damage(int amount)
Parameters
amountintAmount of damage to deal.
Heal(int)
Heals the entity.
void Heal(int amount)
Parameters
amountintAmount of health to heal.
Kill()
Kills the entity.
void Kill()
Revive()
Revives the entity.
void Revive()
Events
OnDeath
Called when entity's health is less than or equal to 0.
event Action OnDeath