Fix: text color
This commit is contained in:
@@ -115,10 +115,10 @@ FlyingSaucer.prototype.update = function() {
|
||||
FlyingSaucer.prototype.updateJetColor = function() {
|
||||
var landingRatio = this.getLandingRatio();
|
||||
|
||||
if(this.jetStatus == FlyingSaucer.JET_STATUS_HIGH && landingRatio < 0.9) {
|
||||
if(this.jetStatus == FlyingSaucer.JET_STATUS_HIGH && landingRatio < GameLevelManager.LEVEL_UP_LANDING_RATIO) {
|
||||
this.jetStatus = FlyingSaucer.JET_STATUS_MIDDLE;
|
||||
this.changeJetColor(FlyingSaucer.JET_COLOR_MIDDLE);
|
||||
} else if(this.jetStatus == FlyingSaucer.JET_STATUS_MIDDLE && landingRatio < 0.1) {
|
||||
} else if(this.jetStatus == FlyingSaucer.JET_STATUS_MIDDLE && landingRatio < GameLevelManager.WARNING_LANDING_RATIO) {
|
||||
this.jetStatus = FlyingSaucer.JET_STATUS_LOW;
|
||||
this.changeJetColor(FlyingSaucer.JET_COLOR_LOW);
|
||||
}
|
||||
@@ -212,6 +212,9 @@ FlyingSaucer.prototype.checkInputText = function(inputText) {
|
||||
|
||||
var word = this.wordText.text;
|
||||
var inputTextLength = inputText.length;
|
||||
if(word.length < inputTextLength)
|
||||
return;
|
||||
|
||||
var index = 0;
|
||||
for(; index < inputTextLength; index++) {
|
||||
// console.log("i : " + index);
|
||||
@@ -239,7 +242,8 @@ FlyingSaucer.prototype.checkWord = function(inputText) {
|
||||
// console.log("inputText : " + inputText);
|
||||
// console.log("this.wordText : " + this.wordText);
|
||||
|
||||
// var word = this.wordText.text;
|
||||
this.wordText.clearColors();
|
||||
this.wordText.addColor(FlyingSaucer.TEXT_COLOR_NORMAL, 0);
|
||||
|
||||
if(this.word == inputText) {
|
||||
this.gameLevelManager.clearWord(this.wordLevel, this.getLandingRatio());
|
||||
|
||||
@@ -45,7 +45,7 @@ var WordFlyingSaucer = {
|
||||
}
|
||||
|
||||
this.flyingsaucers = [];
|
||||
for(var i = 0; i < 2; i++) {
|
||||
for(var i = 0; i < WordFlyingSaucer.MAX_FLYINGSAUCER_COUNT; i++) {
|
||||
this.flyingsaucers[i] = new FlyingSaucer(i);
|
||||
this.flyingsaucers[i].setScoreManager(this.scoreManager);
|
||||
this.flyingsaucers[i].setHeartManager(this.heartManager);
|
||||
@@ -174,3 +174,4 @@ var WordFlyingSaucer = {
|
||||
}
|
||||
|
||||
|
||||
WordFlyingSaucer.MAX_FLYINGSAUCER_COUNT = 5;
|
||||
@@ -14,18 +14,19 @@ GameLevelManager.prototype.getWordScore = function() {
|
||||
|
||||
|
||||
GameLevelManager.prototype.clearWord = function(wordLevel, clearTiming) {
|
||||
console.log("wordLevel : " + wordLevel);
|
||||
console.log("clearTiming : " + clearTiming);
|
||||
// console.log("wordLevel : " + wordLevel);
|
||||
// console.log("clearTiming : " + clearTiming);
|
||||
|
||||
if(this.wordLevel == wordLevel && clearTiming > 0.9) {
|
||||
if(this.wordLevel < GameLevelManager.MAX_KOR_WORD_LEVEL)
|
||||
this.wordLevel++;
|
||||
|
||||
console.log("this.wordLevel : " + this.wordLevel);
|
||||
// console.log("this.wordLevel : " + this.wordLevel);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GameLevelManager.LEVELUP_TIMING = 0.5;
|
||||
GameLevelManager.LEVEL_UP_LANDING_RATIO = 0.7;
|
||||
GameLevelManager.WARNING_LANDING_RATIO = 0.1;
|
||||
|
||||
GameLevelManager.MAX_KOR_WORD_LEVEL = 7;
|
||||
Reference in New Issue
Block a user