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

beta.r3js.org
-=yb4f310 2018-03-19 08:38:06 +01:00
parent 5f5429f814
commit ea07c813c7
1 changed files with 8 additions and 0 deletions

View File

@ -71,6 +71,7 @@ if (data.keyCode === GameLib.System.Input.KEY_LEFT) {
this.state.orientation === GameLib.CustomCode.ORIENTATION_UP ||
this.state.orientation === GameLib.CustomCode.ORIENTATION_DOWN
) {
if (this.state.orientation === GameLib.CustomCode.ORIENTATION_DOWN) {
this.state.flip = true;
} else {
@ -97,6 +98,13 @@ if (data.keyCode === GameLib.System.Input.KEY_RIGHT) {
this.state.orientation === GameLib.CustomCode.ORIENTATION_UP ||
this.state.orientation === GameLib.CustomCode.ORIENTATION_DOWN
) {
if (this.state.orientation === GameLib.CustomCode.ORIENTATION_DOWN) {
this.state.flip = true;
} else {
this.state.flip = false;
}
this.state.orientation = GameLib.CustomCode.ORIENTATION_RIGHT;
this.state.turning = true;
}