Add: KeyMapper

This commit is contained in:
2018-06-12 17:43:34 +09:00
parent cbe59fa819
commit 7907ae34cf
18 changed files with 603 additions and 282 deletions
+13 -5
View File
@@ -51,16 +51,22 @@ class TypingPractice {
.addColor(textPreviewColor[0], 0);
let keyMapper = null;
if(sessionStorageManager.playingAppName.substring("korean") > 0)
keyMapper = new KoreanKeyMapper();
else
keyMapper = new EnglishKeyMapper();
// let keyButton = new KeyButton(100, 400, 100, "A", "align_type");
new Keyboard();
new Keyboard(keyMapper);
this.hand_left = game.add.image(360, 680, "hand_left");
/*
this.hand_left = game.add.image(370, 680, "hand_left");
this.hand_left.scale.set(2);
this.hand_left.anchor.set(0.5);
this.hand_right = game.add.image(660, 680, "hand_right");
this.hand_right = game.add.image(630, 680, "hand_right");
this.hand_right.scale.set(2);
this.hand_right.anchor.set(0.5);
@@ -69,6 +75,8 @@ class TypingPractice {
mask.drawRect(100, 300, 1028, 400);
this.hand_left.mask = mask;
this.hand_right.mask = mask;
*/
// bottom
let screenBottom = new ScreenBottom();
@@ -78,7 +86,7 @@ class TypingPractice {
screenBottom.printBottomRightText(sessionStorageManager.playerName);
game.input.keyboard.addCallbacks(this, null, null, this.keyPress);
// game.input.keyboard.addCallbacks(this, null, null, this.keyPress);
// this.startGame();
// this.countDown();
}