Table of Contents

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

float

IsDead

Whether the entity is dead or not.

bool IsDead { get; }

Property Value

bool

IsInvincible

Whether the entity is invincible.

bool IsInvincible { get; set; }

Property Value

bool

MaxHealth

The max health of the entity.

float MaxHealth { get; set; }

Property Value

float

Methods

Damage(int)

Deals damage to the entity.

void Damage(int amount)

Parameters

amount int

Amount of damage to deal.

Heal(int)

Heals the entity.

void Heal(int amount)

Parameters

amount int

Amount 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

Event Type

Action