lifespan : number
The lifespan allows you to give a Game Object a lifespan in milliseconds.
Once the Game Object is 'born' you can set this to a positive value.
It is automatically decremented by the millisecond equivalent of game.time.physicsElapsed each frame.
When it reaches zero it will call the kill method.
Very handy for particles, bullets, collectibles, or any other short-lived entity.
- Inherited From
- Source code: gameobjects/components/LifeSpan.js (Line 65)
Please login to continue.