OpherV Posted April 24, 2014 Share Posted April 24, 2014 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 More sharing options...
george Posted April 24, 2014 Share Posted April 24, 2014 The loop method returns a Phaser.TimerEvent instance. Save this reference, then you should be able to remove it from your timer the following:timer.remove(event) jflowers45, OpherV and plicatibu 3 Link to comment Share on other sites More sharing options...
jflowers45 Posted May 1, 2014 Share Posted May 1, 2014 George - I needed this too and your answer helped me out so I "liked" it. Thanks! Here's a small example ...CREATING THE TIMERthis.countdownTimer = this.game.time.create(true);this.countdownEvent = this.countdownTimer.loop(1000, this.updateCounter, this);this.countdownTimer.start(); REMOVING THE TIMERthis.countdownTimer.remove(this.countdownEvent); totallybueno 1 Link to comment Share on other sites More sharing options...
Recommended Posts