Jump to content

Phaser loop and timer


Gods
 Share

Recommended Posts

I am using the phaser loop and it is really powerful :) I have a couple questions about how to do things before I use it.

 

this.timeKeeper = 5000;

this.starTimer.loop(this.timeKeeper, this.addStar, this);

 

How would I keep score of every time this loop gets called?

How would I increase the loop speed when the score increases? 
 

I have a demo I hope you can checkout 
http://jsbin.com/xijocikihe/1/edit?js,output

 

I have tried to put this in the update method but didn't work 

   if (this.score === 500){

      this.timeKeeper = 1000;
    }
 
 
 
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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