Bullet#checkWorldBounds

checkWorldBounds : boolean

If this is set to true the Game Object checks if it is within the World bounds each frame.

When it is no longer intersecting the world bounds it dispatches the onOutOfBounds event.

If it was previously out of bounds but is now intersecting the world bounds again it dispatches the onEnterBounds event.

It also optionally kills the Game Object if outOfBoundsKill is true.

When checkWorldBounds is enabled it forces the Game Object to calculate its full bounds every frame.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,
or you have tested performance and find it acceptable.

Inherited From
Source code: gameobjects/components/InWorld.js (Line 98)
doc_phaser
2017-02-14 10:38:08
Comments
Leave a Comment

Please login to continue.