Gods Posted March 31, 2015 Share Posted March 31, 2015 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 More sharing options...
Lomaz Posted April 2, 2015 Share Posted April 2, 2015 http://jsbin.com/rutemazine/2/edit?js,outputThat may help Link to comment Share on other sites More sharing options...
Gods Posted April 2, 2015 Author Share Posted April 2, 2015 http://jsbin.com/rutemazine/2/edit?js,outputThat may helpchange the variables to thesethis.timeKeeper = 4000; if (this.score == 500){ this.starTimer.loop(2000, this.addStar, this); } For me even tho the loop is set to 2000 the diamond spawning is inconsistent Link to comment Share on other sites More sharing options...
Recommended Posts