Fix: apply animal sheet to game, menu

This commit is contained in:
2018-11-13 11:38:20 +09:00
parent 99ca77d950
commit 11ac9924e6
10 changed files with 81 additions and 162 deletions
+31 -125
View File
@@ -11,6 +11,8 @@ function Animal(type, index, x, y) {
this.sprite.animations.add("stand", [index * 2]); this.sprite.animations.add("stand", [index * 2]);
this.sprite.animations.play("stand"); this.sprite.animations.play("stand");
this.sprite.animations.add("run", [index * 2, index * 2 + 1]); this.sprite.animations.add("run", [index * 2, index * 2 + 1]);
this.species = Animal.SPECIES_DATA[index];
} }
@@ -18,30 +20,15 @@ Animal.prototype.setScale = function(value) {
this.sprite.scale.set(value); this.sprite.scale.set(value);
} }
Animal.prototype.setIconSprite = function(species) { // Animal.prototype.setIconSprite = function(species) {
this.setSpecies(species); // this.setSpecies(species);
// }
// this.spriteFrameNames = this.loadSpriteNames();
// this.sprite.loadTexture(this.spriteFrameNames.run1);
}
Animal.prototype.setSpecies = function(species) { Animal.prototype.setSpecies = function(species) {
console.log(species);
this.species = species; this.species = species;
} }
/*
Animal.prototype.loadSpriteNames = function() {
let spriteNames = {};
spriteNames.icon = this.species.species + Animal.SPRITE_NAMES.icon;
spriteNames.run1 = this.species.species + Animal.SPRITE_NAMES.run1;
spriteNames.run2 = this.species.species + Animal.SPRITE_NAMES.run2;
return spriteNames;
}
*/
Animal.prototype.setAlpha = function(value) { Animal.prototype.setAlpha = function(value) {
this.sprite.alpha = value; this.sprite.alpha = value;
} }
@@ -61,55 +48,19 @@ Animal.prototype.tweenAnimation = function(animationType) {
game.add.tween(this.sprite).to( { width: 50 }, 500, Phaser.Easing.Bounce.In, true); game.add.tween(this.sprite).to( { width: 50 }, 500, Phaser.Easing.Bounce.In, true);
// game.add.tween(this.sprite).to( { width: 50 }, 500, Phaser.Easing.Elastic.Out, true); // game.add.tween(this.sprite).to( { width: 50 }, 500, Phaser.Easing.Elastic.Out, true);
break; break;
} }
} }
Animal.prototype.setupAnimation = function() { // Animal.prototype.setupAnimation = function() {
// this.spriteFrameNames = this.loadSpriteNames(); // this.stopAnimation();
// this.playingSpriteFrameName = this.spriteFrameNames.run1; // }
// this.animationFrameID = 1;
// this.animationSpeedSec = 1000 / this.species.runningFPS;
this.stopAnimation();
// this.animateionUpdate();
}
Animal.prototype.startAnimation = function(species) { Animal.prototype.startAnimation = function(species) {
this.sprite.animations.play("run", 5, true); this.sprite.animations.play("run", this.species.fps, true);
/*
this.setSpecies(species);
this.setupAnimation();
if(this.timerEvent === null)
this.timerEvent = game.time.events.loop(this.animationSpeedSec, this.animateionUpdate, this);
*/
} }
/*
Animal.prototype.animateionUpdate = function() {
this.animationFrameID = 1 - this.animationFrameID;
if(this.animationFrameID === 0) {
this.sprite.loadTexture(this.spriteFrameNames.run2);
} else {
this.sprite.loadTexture(this.spriteFrameNames.run1);
}
this.sprite.width = 150;
this.sprite.height = 150;
}
*/
Animal.prototype.stopAnimation = function() { Animal.prototype.stopAnimation = function() {
this.sprite.animations.stop("run"); this.sprite.animations.stop("run");
/*
if(this.timerEvent !== null) {
game.time.events.remove(this.timerEvent);
this.timerEvent = null;
}
*/
} }
@@ -122,6 +73,10 @@ Animal.animalLevelIDByRecord = function(record, gameType) {
return 0; return 0;
} }
Animal.getAnimalPracticeTypingCount = function(animalIndex) {
return Animal.SPECIES_DATA[animalIndex].practiceTypingCount;
}
Animal.typingCount = function(speciesData, gameType) { Animal.typingCount = function(speciesData, gameType) {
if(gameType === Animal.TYPE_PRACTICE) if(gameType === Animal.TYPE_PRACTICE)
return speciesData.practiceTypingCount; return speciesData.practiceTypingCount;
@@ -132,50 +87,7 @@ Animal.typingCount = function(speciesData, gameType) {
Animal.loadResources = function() { Animal.loadResources = function() {
game.load.spritesheet('animals', '../../../resources/image/character/animal/animals.png', 50, 50); game.load.spritesheet('animals', '../../../resources/image/character/animal/animals.png', 50, 50);
// game.load.image('snail_shadow', '../../../resources/image/character/animal/snail/shadow.png');
game.load.image('snail_shadow', '../../../resources/image/character/animal/snail/shadow.png');
/*
game.load.image('snail_icon', '../../../resources/image/character/animal/snail/run2.png');
game.load.image('snail_run1', '../../../resources/image/character/animal/snail/run1.png');
game.load.image('snail_run2', '../../../resources/image/character/animal/snail/run2.png');
game.load.image('turtle_icon', '../../../resources/image/character/animal/turtle/run2.png');
game.load.image('turtle_run1', '../../../resources/image/character/animal/turtle/run1.png');
game.load.image('turtle_run2', '../../../resources/image/character/animal/turtle/run2.png');
game.load.image('cat_icon', '../../../resources/image/character/animal/cat/run2.png');
game.load.image('cat_run1', '../../../resources/image/character/animal/cat/run1.png');
game.load.image('cat_run2', '../../../resources/image/character/animal/cat/run2.png');
game.load.image('lion_icon', '../../../resources/image/character/animal/lion/run2.png');
game.load.image('lion_run1', '../../../resources/image/character/animal/lion/run1.png');
game.load.image('lion_run2', '../../../resources/image/character/animal/lion/run2.png');
game.load.image('rabbit_icon', '../../../resources/image/character/animal/rabbit/run2.png');
game.load.image('rabbit_run1', '../../../resources/image/character/animal/rabbit/run1.png');
game.load.image('rabbit_run2', '../../../resources/image/character/animal/rabbit/run2.png');
game.load.image('ostrich_icon', '../../../resources/image/character/animal/ostrich/run2.png');
game.load.image('ostrich_run1', '../../../resources/image/character/animal/ostrich/run1.png');
game.load.image('ostrich_run2', '../../../resources/image/character/animal/ostrich/run2.png');
game.load.image('horse_icon', '../../../resources/image/character/animal/horse/run2.png');
game.load.image('horse_run1', '../../../resources/image/character/animal/horse/run1.png');
game.load.image('horse_run2', '../../../resources/image/character/animal/horse/run2.png');
game.load.image('dog_icon', '../../../resources/image/character/animal/dog/run2.png');
game.load.image('dog_run1', '../../../resources/image/character/animal/dog/run1.png');
game.load.image('dog_run2', '../../../resources/image/character/animal/dog/run2.png');
game.load.image('cheetah_icon', '../../../resources/image/character/animal/cheetah/run2.png');
game.load.image('cheetah_run1', '../../../resources/image/character/animal/cheetah/run1.png');
game.load.image('cheetah_run2', '../../../resources/image/character/animal/cheetah/run2.png');
game.load.image('eagle_icon', '../../../resources/image/character/animal/eagle/run2.png');
game.load.image('eagle_run1', '../../../resources/image/character/animal/eagle/run1.png');
game.load.image('eagle_run2', '../../../resources/image/character/animal/eagle/run2.png');
*/
} }
@@ -190,25 +102,19 @@ Animal.ANIMATION_TYPE_DAMAGE = 1;
Animal.SPECIES_DATA = [ Animal.SPECIES_DATA = [
{ "species" : "snail", "fps" : 1.1, "practiceTypingCount" : 0, "testTypingCount" : 0 }, { "species" : "snail", "fps" : 1, "practiceTypingCount" : 0, "testTypingCount" : 0 },
{ "species" : "turtle", "fps" : 2.2, "practiceTypingCount" : 5, "testTypingCount" : 20 }, { "species" : "turtle", "fps" : 2, "practiceTypingCount" : 5, "testTypingCount" : 20 },
{ "species" : "chick", "fps" : 3.3, "practiceTypingCount" : 10, "testTypingCount" : 40 }, { "species" : "chick", "fps" : 5, "practiceTypingCount" : 10, "testTypingCount" : 40 },
{ "species" : "mouse", "fps" : 4.4, "practiceTypingCount" : 15, "testTypingCount" : 70 }, { "species" : "mouse", "fps" : 12, "practiceTypingCount" : 15, "testTypingCount" : 70 },
{ "species" : "chicken", "fps" : 5.5, "practiceTypingCount" : 20, "testTypingCount" : 100 }, { "species" : "chicken", "fps" : 11, "practiceTypingCount" : 20, "testTypingCount" : 100 },
{ "species" : "pig", "fps" : 7.7, "practiceTypingCount" : 25, "testTypingCount" : 150 }, { "species" : "pig", "fps" : 5, "practiceTypingCount" : 25, "testTypingCount" : 150 },
{ "species" : "cat", "fps" : 9.9, "practiceTypingCount" : 30, "testTypingCount" : 200 }, { "species" : "cat", "fps" : 10, "practiceTypingCount" : 30, "testTypingCount" : 200 },
{ "species" : "deer", "fps" : 12.2, "practiceTypingCount" : 40, "testTypingCount" : 250 }, { "species" : "deer", "fps" : 9, "practiceTypingCount" : 40, "testTypingCount" : 250 },
{ "species" : "kangaroo", "fps" : 16, "practiceTypingCount" : 50, "testTypingCount" : 300 }, { "species" : "kangaroo", "fps" : 4, "practiceTypingCount" : 50, "testTypingCount" : 300 },
{ "species" : "rabbit", "fps" : 20, "practiceTypingCount" : 60, "testTypingCount" : 350 }, { "species" : "rabbit", "fps" : 12, "practiceTypingCount" : 60, "testTypingCount" : 350 },
{ "species" : "dog", "fps" : 20, "practiceTypingCount" : 80, "testTypingCount" : 400 }, { "species" : "dog", "fps" : 9, "practiceTypingCount" : 70, "testTypingCount" : 400 },
{ "species" : "zebra", "fps" : 20, "practiceTypingCount" : 100, "testTypingCount" : 450 }, { "species" : "zebra", "fps" : 12, "practiceTypingCount" : 80, "testTypingCount" : 450 },
{ "species" : "ostrich", "fps" : 20, "practiceTypingCount" : 120, "testTypingCount" : 500 }, { "species" : "ostrich", "fps" : 15, "practiceTypingCount" : 90, "testTypingCount" : 500 },
{ "species" : "lion", "fps" : 20, "practiceTypingCount" : 140, "testTypingCount" : 600 }, { "species" : "lion", "fps" : 10, "practiceTypingCount" : 100, "testTypingCount" : 600 },
{ "species" : "cheetah", "fps" : 20, "practiceTypingCount" : 160, "testTypingCount" : 700 } { "species" : "cheetah", "fps" : 15, "practiceTypingCount" : 110, "testTypingCount" : 700 }
]; ];
Animal.SPRITE_NAMES = {
"icon" : "_icon",
"run1" : "_run1",
"run2" : "_run2"
};
+2 -5
View File
@@ -9,6 +9,8 @@ function AnimalList(y) {
// console.log("animalCount : " + animalCount); // console.log("animalCount : " + animalCount);
// console.log("offsetAnimal : " + offsetAnimal); // console.log("offsetAnimal : " + offsetAnimal);
this.activeAnimalIndex = 0;
for(var i = 0; i < animalCount; i++) { for(var i = 0; i < animalCount; i++) {
this.animals[i] = new Animal( this.animals[i] = new Animal(
Animal.TYPE_ICON, Animal.TYPE_ICON,
@@ -19,8 +21,6 @@ function AnimalList(y) {
this.inactivate(i); this.inactivate(i);
} }
this.activeAnimalIndex = 0;
// this.activate(this.activeAnimalIndex);
this.activate(this.activeAnimalIndex); this.activate(this.activeAnimalIndex);
this.tweenAnimation(Animal.ANIMATION_TYPE_DAMAGE); this.tweenAnimation(Animal.ANIMATION_TYPE_DAMAGE);
} }
@@ -39,9 +39,6 @@ AnimalList.prototype.inactivate = function(index) {
this.animals[index].stopAnimation(); this.animals[index].stopAnimation();
this.animals[index].setScale(1); this.animals[index].setScale(1);
this.animals[index].setAlpha(AnimalList.ALPHA_INACTIVE); this.animals[index].setAlpha(AnimalList.ALPHA_INACTIVE);
var animalData = Animal.SPECIES_DATA[index];
this.animals[index].setIconSprite(animalData);
} }
AnimalList.prototype.animate = function(index) { AnimalList.prototype.animate = function(index) {
+1 -1
View File
@@ -94,7 +94,7 @@ function RoundRectButton(roundRectSetting, iconName, buttonText, clickEvent) {
this.button.addChild(this.text); this.button.addChild(this.text);
} }
if(iconName.length > 0) { if(iconName != null && iconName.length > 0) {
this.icon = this.makeIcon(iconName); this.icon = this.makeIcon(iconName);
this.setIcon(this.icon); this.setIcon(this.icon);
} }
+9 -6
View File
@@ -1,7 +1,7 @@
TypingAppButton.prototype = Object.create(RoundRectButton.prototype); TypingAppButton.prototype = Object.create(RoundRectButton.prototype);
TypingAppButton.constructor = TypingAppButton; TypingAppButton.constructor = TypingAppButton;
function TypingAppButton(type, x, y, iconName, buttonText, appInfo) { function TypingAppButton(type, x, y, iconSprite, buttonText, appInfo) {
var setting = new RoundRectButtonSetting(x, y, TypingAppButton.BUTTON_WIDTH, TypingAppButton.BUTTON_HEIGHT); var setting = new RoundRectButtonSetting(x, y, TypingAppButton.BUTTON_WIDTH, TypingAppButton.BUTTON_HEIGHT);
setting.fontStyle.boundsAlignH = "center"; // left, center. right setting.fontStyle.boundsAlignH = "center"; // left, center. right
setting.fontStyle.boundsAlignV = "middle"; // top, middle, bottom setting.fontStyle.boundsAlignV = "middle"; // top, middle, bottom
@@ -83,16 +83,19 @@ function TypingAppButton(type, x, y, iconName, buttonText, appInfo) {
this.appInfo = appInfo; this.appInfo = appInfo;
RoundRectButton.call( RoundRectButton.call(
this, setting, this, setting,
iconName, buttonText, null,
buttonText,
this.clickEvent this.clickEvent
); );
this.text.x = 30; this.text.x = 30;
if(iconName.length > 0) { if(iconSprite != null) {
this.icon.x = 40; this.icon = iconSprite.sprite;
this.icon.width = 100; this.buttonIcon = this.button.addChild(this.icon);
this.icon.height = 100;
this.buttonIcon.x = 40;
this.buttonIcon.y = this.button.height / 2 - 5;
} }
} }
+12 -7
View File
@@ -123,14 +123,19 @@ var MenuTypingPractice = {
return 0; return 0;
}, },
getIconImage: function(jsonList, appID) { getAnimalSprite: function(jsonList, appID) {
var appHighestRecord = this.getAppHighestRecord(jsonList, appID); var appHighestRecord = this.getAppHighestRecord(jsonList, appID);
var animalSprite = null;
if(appHighestRecord === 0) if(appHighestRecord === 0) {
return "snail_shadow"; animalSprite = new Animal(Animal.TYPE_ICON, 0, 0, 0);
// animalSprite.sprite.tint = RoundRectButtonSetting.DEFAULT_BUTTON_COLORS.disabled;
} else {
var animalLevel = Animal.animalLevelIDByRecord(appHighestRecord, Animal.TYPE_PRACTICE);
animalSprite = new Animal(Animal.TYPE_ICON, animalLevel, 0, 0);
}
var animalLevel = Animal.animalLevelIDByRecord(appHighestRecord, Animal.TYPE_PRACTICE); return animalSprite;
return Animal.SPECIES_DATA[animalLevel].species + Animal.SPRITE_NAMES.icon;
}, },
downloadListSucceeded: function(replyJSON) { downloadListSucceeded: function(replyJSON) {
@@ -152,7 +157,7 @@ var MenuTypingPractice = {
var typingPracticeButton = new TypingAppButton( var typingPracticeButton = new TypingAppButton(
TypingAppButton.TYPE_PRACTICE_KOREAN, TypingAppButton.TYPE_PRACTICE_KOREAN,
posX, posY, posX, posY,
this.getIconImage(replyJSON.KoreanHighScoreList, activeApp.AppID), this.getAnimalSprite(replyJSON.KoreanHighScoreList, activeApp.AppID),
activeApp.KoreanName, activeApp.KoreanName,
{ {
AppID: activeApp.AppID, AppID: activeApp.AppID,
@@ -176,7 +181,7 @@ var MenuTypingPractice = {
var typingPracticeButton = new TypingAppButton( var typingPracticeButton = new TypingAppButton(
TypingAppButton.TYPE_PRACTICE_ENGLISH, TypingAppButton.TYPE_PRACTICE_ENGLISH,
posX, posY, posX, posY,
this.getIconImage(replyJSON.EnglishHighScoreList, activeApp.AppID), this.getAnimalSprite(replyJSON.EnglishHighScoreList, activeApp.AppID),
activeApp.KoreanName, activeApp.KoreanName,
{ {
AppID: activeApp.AppID, AppID: activeApp.AppID,
+12 -7
View File
@@ -125,14 +125,19 @@ var MenuTypingTest = {
return 0; return 0;
}, },
getIconImage: function(jsonList, appID) { getAnimalSprite: function(jsonList, appID) {
var appHighestRecord = this.getAppHighestRecord(jsonList, appID); var appHighestRecord = this.getAppHighestRecord(jsonList, appID);
var animalSprite = null;
if(appHighestRecord === 0) if(appHighestRecord === 0) {
return "snail_shadow"; animalSprite = new Animal(Animal.TYPE_ICON, 0, 0, 0);
// animalSprite.sprite.tint = RoundRectButtonSetting.DEFAULT_BUTTON_COLORS.disabled;
} else {
var animalLevel = Animal.animalLevelIDByRecord(appHighestRecord, Animal.TYPE_PRACTICE);
animalSprite = new Animal(Animal.TYPE_ICON, animalLevel, 0, 0);
}
var animalLevel = Animal.animalLevelIDByRecord(appHighestRecord, Animal.TYPE_TEST); return animalSprite;
return Animal.SPECIES_DATA[animalLevel].species + Animal.SPRITE_NAMES.icon;
}, },
downloadListSucceeded: function(replyJSON) { downloadListSucceeded: function(replyJSON) {
@@ -154,7 +159,7 @@ var MenuTypingTest = {
var typingTestButton = new TypingAppButton( var typingTestButton = new TypingAppButton(
TypingAppButton.TYPE_TEST_KOREAN, TypingAppButton.TYPE_TEST_KOREAN,
posX, posY, posX, posY,
this.getIconImage(replyJSON.KoreanHighScoreList, activeApp.AppID), this.getAnimalSprite(replyJSON.KoreanHighScoreList, activeApp.AppID),
activeApp.KoreanName, activeApp.KoreanName,
{ {
AppID: activeApp.AppID, AppID: activeApp.AppID,
@@ -178,7 +183,7 @@ var MenuTypingTest = {
var typingTestButton = new TypingAppButton( var typingTestButton = new TypingAppButton(
TypingAppButton.TYPE_TEST_ENGLISH, TypingAppButton.TYPE_TEST_ENGLISH,
posX, posY, posX, posY,
this.getIconImage(replyJSON.EnglishHighScoreList, activeApp.AppID), this.getAnimalSprite(replyJSON.EnglishHighScoreList, activeApp.AppID),
activeApp.KoreanName, activeApp.KoreanName,
{ {
AppID: activeApp.AppID, AppID: activeApp.AppID,
+3 -6
View File
@@ -89,20 +89,17 @@ var Result = {
var record = NumberUtil.numberWithCommas(Math.floor(sessionStorageManager.getRecord())); var record = NumberUtil.numberWithCommas(Math.floor(sessionStorageManager.getRecord()));
style.font = "80px Arial"; style.font = "80px Arial";
// if(sessionStorageManager.getPlayingAppID() < 100) {
if(isTypingPracticeApp() || isTypingTestApp()) { if(isTypingPracticeApp() || isTypingTestApp()) {
var leftAnimal = new Animal(Animal.TYPE_ANIMATION, game.world.centerX - 200, 150);
var animalLevelID = 0; var animalLevelID = 0;
// if(sessionStorageManager.getPlayingAppID() < 20)
if(isTypingPracticeApp()) if(isTypingPracticeApp())
animalLevelID = Animal.animalLevelIDByRecord(sessionStorageManager.getRecord(), Animal.TYPE_PRACTICE); animalLevelID = Animal.animalLevelIDByRecord(sessionStorageManager.getRecord(), Animal.TYPE_PRACTICE);
else else
animalLevelID = Animal.animalLevelIDByRecord(sessionStorageManager.getRecord(), Animal.TYPE_TEST); animalLevelID = Animal.animalLevelIDByRecord(sessionStorageManager.getRecord(), Animal.TYPE_TEST);
// leftAnimal.tweenAnimation(Animal.ANIMATION_TYPE_CHANGE);
var leftAnimal = new Animal(Animal.TYPE_ANIMATION, animalLevelID, game.world.centerX - 200, 150);
leftAnimal.startAnimation(Animal.SPECIES_DATA[animalLevelID]); leftAnimal.startAnimation(Animal.SPECIES_DATA[animalLevelID]);
var rightAnimal = new Animal(Animal.TYPE_ANIMATION, game.world.centerX + 200, 150); var rightAnimal = new Animal(Animal.TYPE_ANIMATION, animalLevelID, game.world.centerX + 200, 150);
// rightAnimal.tweenAnimation(Animal.ANIMATION_TYPE_CHANGE);
rightAnimal.startAnimation(Animal.SPECIES_DATA[animalLevelID]); rightAnimal.startAnimation(Animal.SPECIES_DATA[animalLevelID]);
} }
+2 -2
View File
@@ -30,7 +30,7 @@ TypingTextManager.prototype.fillLeftRightBasicKey = function() {
var char = this.contents[i]; var char = this.contents[i];
// console.log(char); // console.log(char);
if(this.isKoreanConsonant(char)) { if(this.isKoreanConsonant(char)) {
this.contents.splice(i + 1, 0, ""); this.contents.splice(i + 1, 0, "");
} else if(this.isKoreanVowel(char)) { } else if(this.isKoreanVowel(char)) {
this.contents.splice(i, 0, "ㄹ"); this.contents.splice(i, 0, "ㄹ");
} }
@@ -66,7 +66,7 @@ TypingTextManager.prototype.makePracticeContents = function(arr, repeatCount) {
TypingTextManager.prototype.makeTestContents = function(arr) { TypingTextManager.prototype.makeTestContents = function(arr) {
this.init(); this.init();
this.add(this.getShuffledArray()); this.add(this.getShuffledArray(arr));
} }
+4 -3
View File
@@ -380,9 +380,10 @@ var TypingPractice = {
// this.goResult(); // this.goResult();
} }
} else { } else {
this.typingScore.reset(); if(this.playingAnimalIndex > 0)
this.playingAnimalIndex--;
this.typingScore.set(Animal.getAnimalPracticeTypingCount(this.playingAnimalIndex));
this.playingAnimalIndex = 0;
this.animalList.activate(this.playingAnimalIndex); this.animalList.activate(this.playingAnimalIndex);
this.animalList.tweenAnimation(Animal.ANIMATION_TYPE_DAMAGE); this.animalList.tweenAnimation(Animal.ANIMATION_TYPE_DAMAGE);
} }
@@ -405,7 +406,7 @@ TypingPractice.TYPING_COUNT_PLUS_ENTER = 1;
TypingPractice.OFFSET_RIGHT_ALIGN = 10; TypingPractice.OFFSET_RIGHT_ALIGN = 10;
TypingPractice.STAGE_TIMER_SEC = 60; TypingPractice.STAGE_TIMER_SEC = 30;
TypingPractice.COLOR_CONTENT_INPUT = "#dddddd"; TypingPractice.COLOR_CONTENT_INPUT = "#dddddd";
TypingPractice.COLOR_BRACKET = "#dddd70"; TypingPractice.COLOR_BRACKET = "#dddd70";
+5
View File
@@ -38,6 +38,11 @@ TypingScore.prototype.reset = function() {
this.print(this.typingCount); this.print(this.typingCount);
} }
TypingScore.prototype.set = function(score) {
this.typingCount = score;
this.print(this.typingCount);
}
TypingScore.prototype.print = function(typingCount) { TypingScore.prototype.print = function(typingCount) {
this.scoreText.text = typingCount; this.scoreText.text = typingCount;
} }