Whether this entity is active, if set to false it will be reclaimed
Observable that keeps track of component add or remove changes on the entity
Arbitrary data storage per tile, useful for any game specific data
Listen to or emit events for an entity
The unique identifier for the entity
Reference to the TileMap this tile is associated with
The scene that the entity is in, if any
Readonly
xInteger x coordinate of the tile
Readonly
yInteger y coordinate of the tile
Tile bounds in world space
Height of the tile in pixels
Gets whether the actor is Initialized
Wether this tile should be treated as solid by the tilemap
Wether this tile should be treated as solid by the tilemap
Specifically get the tags on the entity from [[TagComponent]]
The types of the components on the Entity
Width of the tile in pixels
Internal
Initializes this entity, meant to be called by the Scene before first update not by users of Excalibur.
It is not recommended that internal excalibur methods be overridden, do so at your own risk.
Internal
It is not recommended that internal excalibur methods be overridden, do so at your own risk.
Internal _preupdate handler for [[onPostUpdate]] lifecycle event
Internal
It is not recommended that internal excalibur methods be overridden, do so at your own risk.
Internal _preupdate handler for [[onPreUpdate]] lifecycle event
Protected
_setAdds a custom collider to the [[Tile]] to use instead of it's bounds
If no collider is set but [[Tile.solid]] is set, the tile bounds are used as a collider.
Note! the [[Tile.solid]] must be set to true for it to act as a "fixed" collider
Add another [[Graphic]] to this TileMap tile
Optional
event: anyGet a component by type with typecheck
(Does not work on tag components, use .hasTag("mytag") instead)
Check if a component type exists
onInitialize
is called before the first update of the entity. This method is meant to be
overridden.
Synonymous with the event handler .on('initialize', (evt) => {...})
Safe to override onPostUpdate lifecycle event handler. Synonymous with .on('postupdate', (evt) =>{...})
onPostUpdate
is called directly after an entity is updated.
Safe to override onPreUpdate lifecycle event handler. Synonymous with .on('preupdate', (evt) =>{...})
onPreUpdate
is called directly before an entity is updated.
Removes a collider from the [[Tile]]
Removes a component from the entity, by default removals are deferred to the end of entity update to avoid consistency issues
Components can be force removed with the force
flag, the removal is not deferred and happens immediately
Remove an instance of a [[Graphic]] from this tile
Internal
Entity update lifecycle, called internally
TileMap Tile
A light-weight object that occupies a space in a collision map. Generally created by a [[TileMap]].
Tiles can draw multiple sprites. Note that the order of drawing is the order of the sprites in the array so the last one will be drawn on top. You can use transparency to create layers this way.