Update: CC - Snake FS - Key Up (306204wy29.js) 119 bytes modified

beta.r3js.org
-=yb4f310 2018-03-15 11:25:17 +01:00
parent 548f2a9712
commit af97520e3f
1 changed files with 4 additions and 3 deletions

View File

@ -26,6 +26,7 @@ if (data.keyCode === GameLib.System.Input.KEY_UP) {
this.state.orientation === GameLib.CustomCode.ORIENTATION_RIGHT
) {
this.state.orientation = GameLib.CustomCode.ORIENTATION_UP;
this.state.turning = true;
}
}
@ -46,6 +47,7 @@ if (data.keyCode === GameLib.System.Input.KEY_DOWN) {
this.state.orientation === GameLib.CustomCode.ORIENTATION_RIGHT
) {
this.state.orientation = GameLib.CustomCode.ORIENTATION_DOWN;
this.state.turning = true;
}
}
@ -65,6 +67,7 @@ if (data.keyCode === GameLib.System.Input.KEY_LEFT) {
this.state.orientation === GameLib.CustomCode.ORIENTATION_DOWN
) {
this.state.orientation = GameLib.CustomCode.ORIENTATION_LEFT;
this.state.turning = true;
}
}
@ -84,10 +87,8 @@ if (data.keyCode === GameLib.System.Input.KEY_RIGHT) {
this.state.orientation === GameLib.CustomCode.ORIENTATION_DOWN
) {
this.state.orientation = GameLib.CustomCode.ORIENTATION_RIGHT;
this.state.turning = true;
}
}
console.log(data);
//@ sourceURL=keyUp.js