alive : boolean
A useful flag to control if the Game Object is alive or dead.
This is set automatically by the Health components damage
method should the object run out of health.
Or you can toggle it via your game code.
This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.
However you can use Group.getFirstAlive
in conjunction with this property for fast object pooling and recycling.
- Default Value
- true
- Source code: gameobjects/components/LifeSpan.js (Line 50)
Please login to continue.