Text#lifespan

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)
doc_phaser
2017-02-14 11:14:06
Comments
Leave a Comment

Please login to continue.