Commit ec721f06 authored by 18류지석's avatar 18류지석

시즌 5호 머지

렉걸림
parent b7c3ba43
......@@ -46,13 +46,22 @@ var gameScene = new Phaser.Class(
create: function()
{
CSVParsing.CSVParse(this);
BackGround.drawBrain(this);
Input.inputField.generate(this);
WordSpace.wordPhysicsGroup = this.physics.add.group();
WordSpace.wordCycle.resetCycle(this, 3000);
Input.inputField.generate(this);
WordSpace.attackGauge.generate(this);
WordSpace.spaceInitiate(this);
// cycle
WordSpace.attackGauge.resetCycle(this);
WordSpace.wordCycle.resetCycle(this, 3000, 0);
WordSpace.nameCycle.resetCycle(this, 3000, 0);
WordSpace.varAdjustCycle.resetCycle(this, 100);
WordSpace.playerTyping.initiate(this);
CSVParsing.CSVParse(this);
},
update: function()
......@@ -61,5 +70,6 @@ var gameScene = new Phaser.Class(
{
element.attract();
});
WordSpace.playerTyping.add('');
}
});
\ No newline at end of file
......@@ -117,7 +117,7 @@ WordSpace.attackGauge =
},
generate: function(scene)
{
console.log("created");
//console.log("created");
this.rectUI = scene.add.rectangle(640,600,0,11).setDepth(11);
},
add: function(plus)
......@@ -206,7 +206,7 @@ WordSpace.nameCycle =
delay: _delay,
callback: function()
{
console.log("호패 on");
//console.log("호패 on");
},
callbackScope: scene,
loop: true
......@@ -354,7 +354,7 @@ WordSpace.findWord = function(wordText)
default: console.log('[ERR] wrong grade of word'); break;
}
weightest.destroy();
WordSpace.nameCycle.resetCycle(WordSpace.gameSceneForTest, WordSpace.NameSpawnDelay, WordSpace.nameCycle.currentCycle.getElapsed() + WordSpace.NameSpawnReduce);
//WordSpace.nameCycle.resetCycle(WordSpace.gameSceneForTest, WordSpace.NameSpawnDelay, WordSpace.nameCycle.currentCycle.getElapsed() + WordSpace.NameSpawnReduce);
while(WordSpace.totalWordNum < 5)
{
......@@ -398,6 +398,7 @@ WordSpace.playerTyping =
WordSpace.attack = function(wordText, grade)
{
console.log("d");
wordText = Input.removeConVow(wordText);
if (wordText != '')
{
......
......@@ -39,7 +39,7 @@ window.addEventListener("message", function(event)
if(window.timeouts[i].ran){
window.timeouts.splice(i,1);
}
}
}
var i = window.timeouts.length;
while (i--) {
if(new Date().getTime() - window.timeouts[i].started >= window.timeouts[i].delay && window.timeouts[i]){
......@@ -52,7 +52,7 @@ window.addEventListener("message", function(event)
if(currTime - window.intervals[i].last >= window.intervals[i].delay && window.intervals[i]){
window.intervals[i].last = currTime;
window.intervals[i].func();
}
}
}
window.postMessage('tick', '*');
}
......@@ -120,5 +120,5 @@ window.addEventListener("message", function(event)
context.clearInterval = old.clearInterval
alert("Your browser does not support postMessage. Sorry but you will be forced to default to the standard setInterval and setTimeout functions. This means you may experience pauses in your game when you navigate away from the tab it is playing in.");
}
});
});
})(this);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment