Jump to content

How to stop looped event?


OpherV
 Share

Recommended Posts

I'm probably missing something here.

I need to stop a looped event started with game.time.events.loop

 

I can see that you can stop the Timer it's attached to, but not the TimerEvent itself.

(That Timer has other events that I don't want to stop)

How can I do this?

 

Thanks!

Link to comment
Share on other sites

George - I needed this too and your answer helped me out so I "liked" it.  Thanks!

 

Here's a small example ...

CREATING THE TIMER

this.countdownTimer = this.game.time.create(true);

this.countdownEvent = this.countdownTimer.loop(1000, this.updateCounter, this);

this.countdownTimer.start();

 

REMOVING THE TIMER

this.countdownTimer.remove(this.countdownEvent);
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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