Add: hands

This commit is contained in:
2018-06-19 22:57:16 +09:00
parent e7ce9c2e10
commit 6a5a2db670
13 changed files with 259 additions and 26 deletions
+13 -5
View File
@@ -65,7 +65,7 @@ class TypingPractice {
this.shiftKey = game.input.keyboard.addKey(Phaser.Keyboard.SHIFT);
/*
/*
this.hand_left = game.add.image(370, 680, "hand_left");
this.hand_left.scale.set(2);
this.hand_left.anchor.set(0.5);
@@ -79,7 +79,10 @@ class TypingPractice {
mask.drawRect(100, 300, 1028, 400);
this.hand_left.mask = mask;
this.hand_right.mask = mask;
*/
*/
this.leftHand = new LeftHand(this.keyMapper);
this.rightHand = new RightHand(this.keyMapper);
// bottom
@@ -237,7 +240,6 @@ class TypingPractice {
if(prevText === undefined)
return;
console.log("hide : " + prevText);
this.keyboard.hideHighlight(prevText);
}
@@ -246,8 +248,14 @@ class TypingPractice {
if(typingText === undefined)
return;
console.log("show : " + typingText);
this.keyboard.showHighlight(typingText);
this.keyboard.showHighlight(typingText, this.leftHand, this.rightHand);
// let key = this.keyboard.getKeyOfText(typingText);
// if(key.handSide == KeyButton.LEFT_HAND) {
// this.leftHand.moveRow(key.row);
// } else if(key.handSide == KeyButton.LEFT_HAND) {
// this.rightHand.moveRow(key.row);
// }
}