Jump to content

How to pause an individual loop


fariazz
 Share

Recommended Posts

I'm creating loops like this:

 

this.someLoop = this.game.time.events.loop(Phaser.Timer.SECOND * 2, callbackMethod, this);

 

this.someOtherLoop = this.game.time.events.loop(Phaser.Timer.SECOND * 5, callbackMethod, this);

 

The problem is when I pause one of them, the rest pause as well:

 

this.someLoop.timer.pause() will also cause this.someOtherLoop to pause.

 

 

How can I stop / pause individual loops? Also, how can I send to the garbage collector a loop?

 

Thanks!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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