fixed speeding up used to create an additional concurrent game loop when enter was pressed
This commit is contained in:
parent
bc11f11d07
commit
74cf58facc
1 changed files with 5 additions and 1 deletions
|
@ -24,6 +24,7 @@ $('#clickToExit').bind('click', toggleDevTools);
|
|||
function toggleDevTools() {
|
||||
$('#devtools').toggle();
|
||||
}
|
||||
var firstTime = 1;
|
||||
var gameState = 0;
|
||||
var framerate = 60;
|
||||
var history = {};
|
||||
|
@ -69,7 +70,10 @@ function init() {
|
|||
startTime = Date.now();
|
||||
waveone = new waveGen(MainClock,Date.now(),[1,1,0],[1,1],[1,1]);
|
||||
console.log(waveone);
|
||||
requestAnimFrame(animLoop);
|
||||
if (firstTime) {
|
||||
firstTime = 0;
|
||||
requestAnimFrame(animLoop);
|
||||
}
|
||||
}
|
||||
|
||||
function addNewBlock(blocklane, color, iter, distFromHex, settled) { //last two are optional parameters
|
||||
|
|
Loading…
Reference in a new issue