KROYSDOCS
HomeWhat's newv0.1.0

Health

Health helpers for entities that have a native HealthComponent.

Kindclass
NamespaceKroys.EngineScripting
Members9
SourceGenerated/NativeComponents.g.cs, Health.cs
DECLARATION

Declaration

Component access: every member takes the entity first, for example Health.Has(Entity). The values are the ones the Inspector shows for this component.

Declaration
public static partial class Health
REFERENCE

Members

Methods
#public static void SetMax(Entity entity, float value)
Sets the Health component's Max value on the entity.
methodstatic
#public static bool IsInvulnerable(Entity entity)
Reads the Health component's Invulnerable value of the entity.
methodstatic
#public static void SetInvulnerable(Entity entity, bool value)
Sets the Health component's Invulnerable value on the entity.
methodstatic
#public static bool Has(Entity entity)
Whether the entity has a Health component.
methodstatic
#public static float GetCurrent(Entity entity)
Current health points.
methodstatic
#public static float GetMax(Entity entity)
Maximum health points.
methodstatic
#public static void SetCurrent(Entity entity, float value)
Sets the current health points.
methodstatic
#public static void ApplyDamage(Entity entity, float amount)
Subtracts damage from the current health (invulnerable entities take none).
methodstatic
#public static void Heal(Entity entity, float amount)
Adds health points to the current health.
methodstatic
Signatures
public static void SetMax(Entity entity, float value)
public static bool IsInvulnerable(Entity entity)
public static void SetInvulnerable(Entity entity, bool value)
public static bool Has(Entity entity)
public static float GetCurrent(Entity entity)
public static float GetMax(Entity entity)
public static void SetCurrent(Entity entity, float value)
public static void ApplyDamage(Entity entity, float amount)
public static void Heal(Entity entity, float amount)

KroysEngine 0.1.0 documentation, built from the engine repository by Tools/BuildDocsSite.py.