Jump to content

How to disable updating when a sprite is out of camera view?


jerry
 Share

Recommended Posts

I believe phaser updates every sprite added to the game( I tried to set alive=false/autoCull=true/visible=false, none of them prevent updating.)

But it seems in many games, enemies only move and shoot when they r in the camera view or reach to a certain distance to the hero. I think this is more effective.

Any one know how to disable updating when a sprite is out of camera view, and enable it when it's in camera view. Thanks.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...