Rope#alive

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.

Inherited From
Default Value
  • true
Source code: gameobjects/components/LifeSpan.js (Line 50)
doc_phaser
2017-02-14 11:08:09
Comments
Leave a Comment

Please login to continue.