Sign in to follow this  

Changing timer duration

Recommended Posts



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.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?



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.