Update: CC - Snake FS - Key Up (306204wy29.js) 119 bytes modified
parent
548f2a9712
commit
af97520e3f
|
@ -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_RIGHT
|
||||||
) {
|
) {
|
||||||
this.state.orientation = GameLib.CustomCode.ORIENTATION_UP;
|
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_RIGHT
|
||||||
) {
|
) {
|
||||||
this.state.orientation = GameLib.CustomCode.ORIENTATION_DOWN;
|
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_DOWN
|
||||||
) {
|
) {
|
||||||
this.state.orientation = GameLib.CustomCode.ORIENTATION_LEFT;
|
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_DOWN
|
||||||
) {
|
) {
|
||||||
this.state.orientation = GameLib.CustomCode.ORIENTATION_RIGHT;
|
this.state.orientation = GameLib.CustomCode.ORIENTATION_RIGHT;
|
||||||
|
this.state.turning = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
//@ sourceURL=keyUp.js
|
//@ sourceURL=keyUp.js
|
Loading…
Reference in New Issue