oobarbazanoo Posted April 2, 2017 Share Posted April 2, 2017 I have a group with sprites. Will the sprite `enemy` be deleted from the group if I add such code and the sprite go out of bounds? enemy.outOfBoundsKill = true; Link to comment Share on other sites More sharing options...
3ddy Posted April 3, 2017 Share Posted April 3, 2017 From Phaser docs: "Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory." It shouldn't be deleted from group. You can easily debug it using some console.logs. Link to comment Share on other sites More sharing options...
spinnerbox Posted April 3, 2017 Share Posted April 3, 2017 Docs for outOfBoundsKill in Sprite "If this and the checkWorldBounds property are both set to true then the kill method is called as soon as inWorld returns false." Link to comment Share on other sites More sharing options...
Recommended Posts