Commit a7b69339 authored by 18손재민's avatar 18손재민

공격 단어 반격 시간 구현, 반격 시간 안에 반격 성공할 경우 강호패가 생성됨

현재 호패 생성 주기가 이상함 수정 요망
parent 6a968efa
......@@ -77,16 +77,17 @@ class AttackWord extends WordObject
this.wordWeight *= isStrong ? 3 : 2;
this.attacker = _attacker;
//서버 사용하게 되면 PlayerTyping을 피격자의 것으로 바꿔야 함
this.attackedTime = this.wordTyping <= (5 - _wordGrade) * 2.5 ? this.wordTyping * (WordSpace.playerTyping / 60) * 2 :
((5 - _wordGrade) * 2.5 + (this.wordTyping - (5 - _wordGrade) * 2.5) * 3) * (WordSpace.playerTyping / 60) * 2;
/*this.counterTime = WordSpace.gameTimer.now + 1000 * (this.wordTyping <= (5 - _wordGrade) * 2.5 ? this.wordTyping * (WordSpace.playerTyping / 60) * 2 :
((5 - _wordGrade) * 2.5 + (this.wordTyping - (5 - _wordGrade) * 2.5) * 3) * (WordSpace.playerTyping / 60) * 2);*/
this.counterTime = WordSpace.gameTimer.now + 10000;
console.log('Attack text : ' + text + ', Attacker : ' + this.attacker + ', Weight : ' + this.wordWeight);
console.log('Attacked time : ' + this.attackedTime);
console.log('Counter time : ' + this.counterTime);
console.log(WordSpace.playerTyping);
}
destroy()
{
//if(this.attackedTim)
if(WordSpace.gameTimer.now < this.counterTime) WordSpace.generateWord.Name(WordSpace.gameSceneForTest, true);
super.destroy();
}
}
......
......@@ -65,7 +65,7 @@ WordSpace.gameOverCycle = new cycle(gameOver);
//호패 생성 사이클
WordSpace.nameCycle = new cycle(function()
{
console.log("호패 on");
WordSpace.generateWord.Name(WordSpace.gameSceneForTest, false);
});
//이건 뭐지
WordSpace.varAdjustCycle = new cycle(function()
......
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