Skip to content

Entity

Base class for an entity.

TODO: expand on what an entity is.

Methods

Entity:despawn()

Despawns this entity.

Entity:is_ability() → boolean

Whether this entity is an Ability.

Returns

  • boolean

Entity:as_ability() → Ability?

Typecasts this entity to an Ability, if possible. Otherwise, returns nil.

Returns

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

Entity:is_unit() → boolean

Whether this entity is a Unit.

Returns

  • boolean

Entity:as_unit() → Unit?

Typecasts this entity to a Unit, if possible. Otherwise, returns nil.

Returns

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.

Returns