Add: animal_list for typing practice and test

This commit is contained in:
2018-10-07 00:00:42 +09:00
parent cb74f9ec32
commit dbcc8b3848
6 changed files with 81 additions and 44 deletions
+6 -9
View File
@@ -22,11 +22,6 @@ var TypingTest = {
screenTopUI.makeFullScreenButton();
// this.animalOnTitle = new Animal(Animal.TYPE_ON_TITLE, game.world.centerX - 200, 30);
this.animalOnTitle = new Animal(Animal.TYPE_ON_TITLE, game.world.centerX, GAME_SCREEN_SIZE.y - 110);
this.animalOnTitle.startAnimation(Animal.SPECIES_DATA[0]);
this.averageTypingSpeedText = new AverageTypingSpeed();
this.contentProgressText = new ContentProgress();
@@ -104,6 +99,9 @@ var TypingTest = {
}
this.animalList = new AnimalList(GAME_SCREEN_SIZE.y - 110);
// bottom ui
var screenBottomUI = new ScreenBottomUI();
screenBottomUI.printLeftTextWithBestRecord(sessionStorageManager.getBestRecord());
@@ -156,7 +154,7 @@ var TypingTest = {
gameOver: function() {
var gameOverText = new GameOverText();
this.animalOnTitle.stopAnimation();
this.animalList.stopAnimation();
game.time.events.add(Phaser.Timer.SECOND * 2, this.goResult, this);
},
@@ -401,9 +399,8 @@ var TypingTest = {
// console.log('-----------------------------------');
var animalLevelID = Animal.animalLevelIDByRecord(typingRecordTotalInteger, Animal.TYPE_TEST);
this.animalOnTitle.startAnimation(Animal.SPECIES_DATA[animalLevelID]);
this.animalOnTitle.tweenAnimation(Animal.ANIMATION_TYPE_CHANGE);
this.animalList.activate(animalLevelID);
this.animalList.tweenAnimation(Animal.ANIMATION_TYPE_CHANGE);
},
playNextContent: function() {