This commit is contained in:
Garrett Finucane 2014-08-24 12:41:06 -04:00
commit bcaefacc15
3 changed files with 11 additions and 2 deletions

View file

@ -20,6 +20,7 @@ function hidebottombar() {
}
function initialize(a) {
window.rush = 1;
window.lastTime = Date.now();
window.iframHasLoaded = false;
window.colors = ["#e74c3c", "#f1c40f", "#3498db", "#2ecc71"];

View file

@ -201,3 +201,11 @@ function handleClickTap(x,y) {
MainHex.rotate(-1);
}
}
function setRush() {
rush = 2;
}
function removeRush() {
rush = 1;
}

View file

@ -207,7 +207,7 @@ function animLoop() {
requestAnimFrame(animLoop);
render();
var now = Date.now();
var dt = (now - lastTime)/16.666;
var dt = (now - lastTime)/16.666 * rush;
if(gameState == 1 ){
if(!MainHex.delay) {
@ -255,7 +255,7 @@ function animLoop() {
case 2:
var now = Date.now();
var dt = (now - lastTime)/16.666;
var dt = (now - lastTime)/16.666 * rush;
requestAnimFrame(animLoop);
update(dt);
render();