diff --git a/resources/image/character/animal/cat/run1.png b/resources/image/character/animal/cat/run1.png index 75106e1..f902d12 100755 Binary files a/resources/image/character/animal/cat/run1.png and b/resources/image/character/animal/cat/run1.png differ diff --git a/resources/image/character/animal/cat/run2.png b/resources/image/character/animal/cat/run2.png index 59f94fa..c917588 100755 Binary files a/resources/image/character/animal/cat/run2.png and b/resources/image/character/animal/cat/run2.png differ diff --git a/resources/image/character/animal/cheetah/run1.png b/resources/image/character/animal/cheetah/run1.png index 4c8f464..4d277b3 100755 Binary files a/resources/image/character/animal/cheetah/run1.png and b/resources/image/character/animal/cheetah/run1.png differ diff --git a/resources/image/character/animal/cheetah/run2.png b/resources/image/character/animal/cheetah/run2.png index 78470b6..5c537ce 100755 Binary files a/resources/image/character/animal/cheetah/run2.png and b/resources/image/character/animal/cheetah/run2.png differ diff --git a/resources/image/character/animal/dog/run1.png b/resources/image/character/animal/dog/run1.png index aaf7692..95eb61d 100755 Binary files a/resources/image/character/animal/dog/run1.png and b/resources/image/character/animal/dog/run1.png differ diff --git a/resources/image/character/animal/dog/run2.png b/resources/image/character/animal/dog/run2.png index 873d259..f2a765d 100755 Binary files a/resources/image/character/animal/dog/run2.png and b/resources/image/character/animal/dog/run2.png differ diff --git a/resources/image/character/animal/eagle/run1.png b/resources/image/character/animal/eagle/run1.png index f234adf..1ab26d8 100755 Binary files a/resources/image/character/animal/eagle/run1.png and b/resources/image/character/animal/eagle/run1.png differ diff --git a/resources/image/character/animal/eagle/run2.png b/resources/image/character/animal/eagle/run2.png index 64ec417..7abb12d 100755 Binary files a/resources/image/character/animal/eagle/run2.png and b/resources/image/character/animal/eagle/run2.png differ diff --git a/resources/image/character/animal/horse/run1.png b/resources/image/character/animal/horse/run1.png index 1b9e9f5..b65c7da 100755 Binary files a/resources/image/character/animal/horse/run1.png and b/resources/image/character/animal/horse/run1.png differ diff --git a/resources/image/character/animal/horse/run2.png b/resources/image/character/animal/horse/run2.png index a5d7cec..02acbb0 100755 Binary files a/resources/image/character/animal/horse/run2.png and b/resources/image/character/animal/horse/run2.png differ diff --git a/resources/image/character/animal/lion/run1.png b/resources/image/character/animal/lion/run1.png index 4f6602d..7eb2885 100755 Binary files a/resources/image/character/animal/lion/run1.png and b/resources/image/character/animal/lion/run1.png differ diff --git a/resources/image/character/animal/lion/run2.png b/resources/image/character/animal/lion/run2.png index 017110c..2c0f7ab 100755 Binary files a/resources/image/character/animal/lion/run2.png and b/resources/image/character/animal/lion/run2.png differ diff --git a/resources/image/character/animal/ostrich/run1.png b/resources/image/character/animal/ostrich/run1.png index 05f73a0..c50e71e 100755 Binary files a/resources/image/character/animal/ostrich/run1.png and b/resources/image/character/animal/ostrich/run1.png differ diff --git a/resources/image/character/animal/ostrich/run2.png b/resources/image/character/animal/ostrich/run2.png index 1ebf628..126a3f2 100755 Binary files a/resources/image/character/animal/ostrich/run2.png and b/resources/image/character/animal/ostrich/run2.png differ diff --git a/resources/image/character/animal/rabbit/run1.png b/resources/image/character/animal/rabbit/run1.png index 3a27767..26f39ca 100755 Binary files a/resources/image/character/animal/rabbit/run1.png and b/resources/image/character/animal/rabbit/run1.png differ diff --git a/resources/image/character/animal/rabbit/run2.png b/resources/image/character/animal/rabbit/run2.png index 7f05157..db4dc2f 100755 Binary files a/resources/image/character/animal/rabbit/run2.png and b/resources/image/character/animal/rabbit/run2.png differ diff --git a/resources/image/character/animal/snail/run1.png b/resources/image/character/animal/snail/run1.png index 8b5cf3d..7d66371 100755 Binary files a/resources/image/character/animal/snail/run1.png and b/resources/image/character/animal/snail/run1.png differ diff --git a/resources/image/character/animal/snail/run2.png b/resources/image/character/animal/snail/run2.png index b963ac0..d829f8d 100755 Binary files a/resources/image/character/animal/snail/run2.png and b/resources/image/character/animal/snail/run2.png differ diff --git a/resources/image/character/animal/snail/shadow.png b/resources/image/character/animal/snail/shadow.png new file mode 100755 index 0000000..4646e0c Binary files /dev/null and b/resources/image/character/animal/snail/shadow.png differ diff --git a/resources/image/character/animal/turtle/run1.png b/resources/image/character/animal/turtle/run1.png index bab9e24..7384a42 100755 Binary files a/resources/image/character/animal/turtle/run1.png and b/resources/image/character/animal/turtle/run1.png differ diff --git a/resources/image/character/animal/turtle/run2.png b/resources/image/character/animal/turtle/run2.png index 19623a4..3955776 100755 Binary files a/resources/image/character/animal/turtle/run2.png and b/resources/image/character/animal/turtle/run2.png differ diff --git a/src/game/lib/animal.js b/src/game/lib/animal.js index 6e50519..6c800df 100644 --- a/src/game/lib/animal.js +++ b/src/game/lib/animal.js @@ -47,14 +47,14 @@ class Animal { tweenAnimation(animationType) { switch(animationType) { case Animal.ANIMATION_TYPE_CHANGE: - this.sprite.width = 70; - this.sprite.height = 70; - game.add.tween(this.sprite).to( { width: 50, height: 50 }, 500, Phaser.Easing.Bounce.Out, true); + this.sprite.width = 200; + this.sprite.height = 200; + game.add.tween(this.sprite).to( { width: 150, height: 150 }, 500, Phaser.Easing.Bounce.Out, true); break; case Animal.ANIMATION_TYPE_DAMAGE: - this.sprite.width = 100; - game.add.tween(this.sprite).to( { width: 50 }, 500, Phaser.Easing.Bounce.In, true); + this.sprite.width = 200; + game.add.tween(this.sprite).to( { width: 150 }, 500, Phaser.Easing.Bounce.In, true); // game.add.tween(this.sprite).to( { width: 50 }, 500, Phaser.Easing.Elastic.Out, true); break; @@ -71,8 +71,8 @@ class Animal { if(this.sprite === null) { this.sprite = game.add.sprite(this.posX, this.posY, this.spriteFrameNames.run1); this.sprite.anchor.set(0.5); - this.sprite.width = 50; - this.sprite.height = 50; + this.sprite.width = 150; + this.sprite.height = 150; } this.stopAnimation(); @@ -103,6 +103,8 @@ class Animal { static loadResources() { + 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'); diff --git a/src/game/lib/button/round_rect_button.js b/src/game/lib/button/round_rect_button.js index b435a95..b6b49f7 100644 --- a/src/game/lib/button/round_rect_button.js +++ b/src/game/lib/button/round_rect_button.js @@ -25,7 +25,7 @@ class RoundRectButtonSetting { this.strokeColors = { }; this.strokeColors.out = out; this.strokeColors.over = over; - this.strokeColors.odownut = down; + this.strokeColors.down = down; this.strokeColors.disabled = disabled; } @@ -33,7 +33,7 @@ class RoundRectButtonSetting { this.buttonColors = { }; this.buttonColors.out = out; this.buttonColors.over = over; - this.buttonColors.odownut = down; + this.buttonColors.down = down; this.buttonColors.disabled = disabled; } @@ -41,7 +41,7 @@ class RoundRectButtonSetting { this.textColors = { }; this.textColors.out = out; this.textColors.over = over; - this.textColors.odownut = down; + this.textColors.down = down; this.textColors.disabled = disabled; } diff --git a/src/game/lib/button/typing_app_button.js b/src/game/lib/button/typing_app_button.js index a868150..2f19346 100644 --- a/src/game/lib/button/typing_app_button.js +++ b/src/game/lib/button/typing_app_button.js @@ -1,13 +1,59 @@ class TypingAppButton extends RoundRectButton { - constructor(x, y, iconName, buttonText, clickEvent) { + constructor(type, x, y, iconName, buttonText, clickEvent) { let setting = new RoundRectButtonSetting(x, y, TypingAppButton.BUTTON_WIDTH, TypingAppButton.BUTTON_HEIGHT); setting.fontStyle.boundsAlignH = "center"; // left, center. right setting.fontStyle.boundsAlignV = "middle"; // top, middle, bottom setting.strokeWidthPx = 5; + switch(type) { + case TypingAppButton.TYPE_PRACTICE_KOREAN: + case TypingAppButton.TYPE_TEST_KOREAN: + setting.setStrokeColor( + 0xffffff, + 0xeeeeff, + 0xccccdd, + 0x333333 + ); + setting.setButtonColor( + 0xeeeeff, + 0xddddee, + 0xccccdd, + 0x666666 + ); + setting.setTextColor( + "#668", + "#668", + "#668", + "#333" + ); + break; + + case TypingAppButton.TYPE_PRACTICE_ENGLISH: + case TypingAppButton.TYPE_TEST_ENGLISH: + setting.setStrokeColor( + 0xffffff, + 0xffeeee, + 0xddcccc, + 0x333333 + ); + setting.setButtonColor( + 0xffeeee, + 0xeedddd, + 0xddcccc, + 0x666666 + ); + setting.setTextColor( + "#866", + "#866", + "#866", + "#333" + ); + break; + } + /* setting.setStrokeColor( - 0x444488, + 0xffffff, //0x444488, 0x6666aa, 0x6666aa, 0x333333 @@ -24,6 +70,7 @@ class TypingAppButton extends RoundRectButton { "#a66", "#333" ); + */ setting.fontStyle = { font: "22px Arial", @@ -34,21 +81,31 @@ class TypingAppButton extends RoundRectButton { super(setting, iconName, buttonText, clickEvent); + this.text.x = 30; + if(iconName.length > 0) { - let iconImage = game.add.sprite(0, 0, iconName); - iconImage.width = 80; - iconImage.height = 80; - this.button.setIcon(iconImage); + console.log(this.icon); + this.icon.x = 40; + this.icon.width = 100; + this.icon.height = 100; } + } } -TypingAppButton.BUTTON_WIDTH = 220; +TypingAppButton.TYPE_PRACTICE_KOREAN = 0; +TypingAppButton.TYPE_PRACTICE_ENGLISH = 1; +TypingAppButton.TYPE_TEST_KOREAN = 2; +TypingAppButton.TYPE_TEST_ENGLISH = 3; + +TypingAppButton.BUTTON_WIDTH = 230; TypingAppButton.BUTTON_HEIGHT = 80; TypingAppButton.BUTTON_GAP = 10; -TypingAppButton.MARGIN_VERTICAL = 100; +TypingAppButton.MARGIN_VERTICAL = 20; TypingAppButton.BUTTON_UPPER_POS_Y = 205; -TypingAppButton.BUTTON_LOWER_POS_Y = 475; \ No newline at end of file +TypingAppButton.BUTTON_LOWER_POS_Y = 475; + +TypingAppButton.QUESTION_ICON = ""; \ No newline at end of file diff --git a/src/game/lib/button/typing_tab_button.js b/src/game/lib/button/typing_tab_button.js index af84960..5f94476 100644 --- a/src/game/lib/button/typing_tab_button.js +++ b/src/game/lib/button/typing_tab_button.js @@ -41,10 +41,10 @@ class TypingTabButton extends RoundRectButton { } -TypingTabButton.BUTTON_WIDTH = 445; +TypingTabButton.BUTTON_WIDTH = 490; TypingTabButton.BUTTON_HEIGHT = 80; -TypingTabButton.BUTTON_GAP = 26; +TypingTabButton.BUTTON_GAP = 5; TypingTabButton.MARGIN_VERTICAL = 100; TypingTabButton.PRACTICE_BUTTON_POS_X = GAME_SCREEN_SIZE.x / 4 + TypingTabButton.BUTTON_GAP; diff --git a/src/game/menu/app_area_bg.js b/src/game/menu/app_area_bg.js index 899471d..c6bb615 100644 --- a/src/game/menu/app_area_bg.js +++ b/src/game/menu/app_area_bg.js @@ -20,8 +20,11 @@ class AppAreaBG { AppAreaBG.COLOR_MOUSE_APP = 0xffce54; AppAreaBG.COLOR_TYPING_APP = 0x99ccff; -AppAreaBG.COLOR_TYPING_KOREAN = 0xffccff; -AppAreaBG.COLOR_TYPING_ENGLISH = 0x77aaff; +AppAreaBG.COLOR_TYPING_KOREAN = 0x88bbff; +AppAreaBG.COLOR_TYPING_ENGLISH = 0xbbccff; AppAreaBG.GAP_X = 10; -AppAreaBG.GAP_Y = 10; \ No newline at end of file +AppAreaBG.GAP_Y = 10; + +AppAreaBG.MARGIN_X = 20; +AppAreaBG.MARGIN_Y = 10; \ No newline at end of file diff --git a/src/game/menu/menu_app.js b/src/game/menu/menu_app.js index fcc5791..d2d5b28 100644 --- a/src/game/menu/menu_app.js +++ b/src/game/menu/menu_app.js @@ -18,9 +18,9 @@ class MenuApp { GAME_SCREEN_SIZE.x, 280 ); mouseBG.printText( - "마 우 스 연 습 앱", - game.world.centerX, 320, - 36, "#000", 0.05 + "마우스 연습 앱", + game.world.centerX, 200, + 170, "#000", 0.03 ); // typing app area @@ -29,9 +29,9 @@ class MenuApp { GAME_SCREEN_SIZE.x, 378 ); typingBG.printText( - "타 자 연 습 앱", - game.world.centerX, 370, - 36, "#000", 0.05 + "타 자 연 습 앱", + game.world.centerX, 500, + 170, "#000", 0.03 ); diff --git a/src/game/menu/menu_typing_practice.js b/src/game/menu/menu_typing_practice.js index b3edcdd..315f42d 100644 --- a/src/game/menu/menu_typing_practice.js +++ b/src/game/menu/menu_typing_practice.js @@ -6,6 +6,8 @@ class MenuTypingPractice { preload() { game.load.image('icon_fullscreen', '../../../resources/image/icon/fullscreen_white.png'); game.load.image('space_invaders', '../../../resources/image/icon/space_invaders.png'); + + Animal.loadResources(); } create() { @@ -27,25 +29,25 @@ class MenuTypingPractice { // korean app area let koreanBG = new AppAreaBG(AppAreaBG.COLOR_TYPING_KOREAN, 1, - 0, 60 + AppAreaBG.GAP_Y, - GAME_SCREEN_SIZE.x, 270 - ); - koreanBG.printText( - "한 글 타 자", - game.world.centerX, 320, - 36, "#000", 0.05 + AppAreaBG.MARGIN_X, 60 + AppAreaBG.GAP_Y, + GAME_SCREEN_SIZE.x - AppAreaBG.MARGIN_X * 2, 270 ); + // koreanBG.printText( + // "한 글 타 자", + // game.world.centerX, 320, + // 36, "#000", 0.05 + // ); // english app area let englishBG = new AppAreaBG(AppAreaBG.COLOR_TYPING_ENGLISH, 1, - 0, 340, - GAME_SCREEN_SIZE.x, 270 - ); - englishBG.printText( - "영 문 타 자", - game.world.centerX, 370, - 36, "#000", 0.05 + AppAreaBG.MARGIN_X, 340, + GAME_SCREEN_SIZE.x - AppAreaBG.MARGIN_X * 2, 270 ); + // englishBG.printText( + // "영 문 타 자", + // game.world.centerX, 370, + // 36, "#000", 0.05 + // ); // typing tab buttons @@ -113,9 +115,11 @@ class MenuTypingPractice { TypingAppButton.BUTTON_UPPER_POS_Y ); + let iconImage = "snail_shadow"; let typingPracticeButton = new TypingAppButton( + TypingAppButton.TYPE_PRACTICE_KOREAN, posX, posY, - TypingAppButton.NONE_ICON, + iconImage, activeApp.KoreanName, () => { sessionStorageManager.playingAppID = activeApp.AppID; @@ -137,9 +141,11 @@ class MenuTypingPractice { TypingAppButton.BUTTON_LOWER_POS_Y ); + let iconImage = "snail_shadow"; let typingPracticeButton = new TypingAppButton( + TypingAppButton.TYPE_PRACTICE_ENGLISH, posX, posY, - TypingAppButton.NONE_ICON, + iconImage, activeApp.KoreanName, () => { sessionStorageManager.playingAppID = activeApp.AppID; diff --git a/src/game/menu/menu_typing_test.js b/src/game/menu/menu_typing_test.js index f6d6a85..767e161 100644 --- a/src/game/menu/menu_typing_test.js +++ b/src/game/menu/menu_typing_test.js @@ -6,6 +6,8 @@ class MenuTypingTest { preload() { game.load.image('icon_fullscreen', '../../../resources/image/icon/fullscreen_white.png'); game.load.image('space_invaders', '../../../resources/image/icon/space_invaders.png'); + + Animal.loadResources(); } create() { @@ -113,9 +115,11 @@ class MenuTypingTest { TypingAppButton.BUTTON_UPPER_POS_Y ); + let iconImage = "snail_shadow"; let typingTestButton = new TypingAppButton( + TypingAppButton.TYPE_TEST_KOREAN, posX, posY, - TypingAppButton.NONE_ICON, + iconImage, activeApp.KoreanName, () => { sessionStorageManager.playingAppID = activeApp.AppID; @@ -137,9 +141,11 @@ class MenuTypingTest { TypingAppButton.BUTTON_LOWER_POS_Y ); + let iconImage = "snail_shadow"; let typingTestButton = new TypingAppButton( + TypingAppButton.TYPE_TEST_ENGLISH, posX, posY, - TypingAppButton.NONE_ICON, + iconImage, activeApp.KoreanName, () => { sessionStorageManager.playingAppID = activeApp.AppID; diff --git a/src/web/client/menu_typing_practice.html b/src/web/client/menu_typing_practice.html index 237b35a..10fc9c9 100644 --- a/src/web/client/menu_typing_practice.html +++ b/src/web/client/menu_typing_practice.html @@ -22,6 +22,7 @@ + diff --git a/src/web/client/menu_typing_test.html b/src/web/client/menu_typing_test.html index f840cc2..d86e226 100644 --- a/src/web/client/menu_typing_test.html +++ b/src/web/client/menu_typing_test.html @@ -22,6 +22,7 @@ +