Base class for an entity.
TODO: expand on what an entity is.
Summary
Section titled “Summary”Methods
- despawn
()Despawns this entity. […]
- is_ability
() → booleanWhether this entity is an Ability. […]
- as_ability
() → Ability?Typecasts this entity to an Ability, if possible. […]
- to_ability
() → AbilityForces this entity into an Ability type. […]
- is_unit
() → booleanWhether this entity is a Unit. […]
-
Typecasts this entity to a Unit, if possible. […]
-
Forces this entity into a Unit type. […]
Methods
Section titled “Methods”despawn
Section titled “despawn”Entity:despawn()
Despawns this entity.
is_ability
Section titled “is_ability”Entity:is_ability() → boolean
Whether this entity is an Ability.
Returns
-
boolean
as_ability
Section titled “as_ability”Entity:as_ability() → Ability?
Typecasts this entity to an Ability, if possible. Otherwise, returns nil.
Returns
to_ability
Section titled “to_ability”Entity:to_ability() → Ability
Forces this entity into an Ability type.
If the entity is not an ability, any methods from Ability may fail. This is generally unsafe. Use with caution.
Returns
is_unit
Section titled “is_unit”Entity:is_unit() → boolean
Whether this entity is a Unit.
Returns
-
boolean
as_unit
Section titled “as_unit”Entity:as_unit() → Unit?
Typecasts this entity to a Unit, if possible. Otherwise, returns nil.
Returns
-
Unit?
to_unit
Section titled “to_unit”Entity:to_unit() → Unit
Forces this entity into a Unit type.
If the entity is not a unit, any methods from Unit may fail. This is generally unsafe. Use with caution.