Jump to content

Changing timer duration


mtburdon
 Share

Recommended Posts

Hi,

 

Sorry if this has been answered before but I couldn't seem to find an answer.

 

I'm using a timer to give my player a set amount of time to complete some levels.

Depending on certain actions I want to be able to give the player more or less time as the clock counts down but can't seem to find out how.

 

I'm using this code to set up my timer:

this.timer = this.game.time.create(false);this.timer.loop(timerSeconds * 1000, this.timeUp, this);this.timer.start();

Is it possible to update this with an extra 5 seconds or 5 seconds less for example while it's counting down?

 

Thanks.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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