kill() → {PIXI.DisplayObject}
Kills a Game Object. A killed Game Object has its alive
, exists
and visible
properties all set to false.
It will dispatch the onKilled
event. You can listen to events.onKilled
for the signal.
Note that killing a Game Object is a way for you to quickly recycle it in an object pool,
it doesn't destroy the object or free it up from memory.
If you don't need this Game Object any more you should call destroy
instead.
Returns
PIXI.DisplayObject -
This instance.
- Inherited From
- Source code: gameobjects/components/LifeSpan.js (Line 113)
Please login to continue.