Members
(readonly) deleting :bool
Whether the object is being deleted.
Type:
- bool
(readonly) deletingImmediate
Whether the object is being deleted immediately.
pos :Vec2
The grid position of the entity.
Type:
rot :number
The rotation of the entity in degrees.
Type:
- number
scl :number
The scale of the entity.
Type:
- number
script :function
The script of the entity. It is probably possible, but not recommended, to change this value.
Type:
- function
(readonly) smoothPos :Vec2
The real position of the entity.
Type:
sprite :string
The sprite of the entity.
Type:
- string
Methods
destroy()
Deletes the entity with an animation. The entity's script will still run until the end of the animation. Calling this multiple times has no effect.
destroyImmediate()
Deletes the entity immediately without an animation. The entity's script will not run after this function is called. Calling this multiple times has no effect. The entity will be removed from the game in the next frame.