var appleTimer = game.time.create (true);
appleTimer.loop (1000, function () {
})
how can I let the loop cycle time not be fixed at 1000, but get faster over time
var appleTimer = game.time.create (true);
appleTimer.loop (1000, function () {
})
how can I let the loop cycle time not be fixed at 1000, but get faster over time
you can use timing recursion, for example:
var timeout = 1000;
function test () {
setTimeout(function() {
// do some thing
if () {
test();
} else {
//
}
}, timeout);
timeout = timeout <= 200 ? 200 : timeout - 50;
}
/ / Let it run
test ();
Previous: Is there any risk in the application of game engine phaser in production?
Next: Database table design