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

beta.r3js.org
-=yb4f310 2018-03-19 09:36:38 +01:00
parent 24b8c72db3
commit a390d943eb
1 changed files with 8 additions and 8 deletions

View File

@ -31,9 +31,9 @@ if (data.keyCode === GameLib.System.Input.KEY_UP) {
this.state.orientation === GameLib.CustomCode.ORIENTATION_RIGHT this.state.orientation === GameLib.CustomCode.ORIENTATION_RIGHT
) { ) {
if (this.state.orientation === GameLib.CustomCode.ORIENTATION_RIGHT) { if (this.state.orientation === GameLib.CustomCode.ORIENTATION_RIGHT) {
this.state.flip = false; this.state.flip = 0;
} else { } else {
this.state.flip = true; this.state.flip = -1;
} }
this.state.orientation = GameLib.CustomCode.ORIENTATION_UP; this.state.orientation = GameLib.CustomCode.ORIENTATION_UP;
@ -58,9 +58,9 @@ if (data.keyCode === GameLib.System.Input.KEY_DOWN) {
this.state.orientation === GameLib.CustomCode.ORIENTATION_RIGHT this.state.orientation === GameLib.CustomCode.ORIENTATION_RIGHT
) { ) {
if (this.state.orientation === GameLib.CustomCode.ORIENTATION_RIGHT) { if (this.state.orientation === GameLib.CustomCode.ORIENTATION_RIGHT) {
this.state.flip = true; this.state.flip = 1;
} else { } else {
this.state.flip = false; this.state.flip = 0;
} }
this.state.orientation = GameLib.CustomCode.ORIENTATION_DOWN; this.state.orientation = GameLib.CustomCode.ORIENTATION_DOWN;
@ -85,9 +85,9 @@ if (data.keyCode === GameLib.System.Input.KEY_LEFT) {
) { ) {
if (this.state.orientation === GameLib.CustomCode.ORIENTATION_DOWN) { if (this.state.orientation === GameLib.CustomCode.ORIENTATION_DOWN) {
this.state.flip = true; this.state.flip = 1;
} else { } else {
this.state.flip = false; this.state.flip = 0;
} }
this.state.orientation = GameLib.CustomCode.ORIENTATION_LEFT; this.state.orientation = GameLib.CustomCode.ORIENTATION_LEFT;
@ -112,9 +112,9 @@ if (data.keyCode === GameLib.System.Input.KEY_RIGHT) {
) { ) {
if (this.state.orientation === GameLib.CustomCode.ORIENTATION_UP) { if (this.state.orientation === GameLib.CustomCode.ORIENTATION_UP) {
this.state.flip = true; this.state.flip = 1;
} else { } else {
this.state.flip = false; this.state.flip = 0;
} }
this.state.orientation = GameLib.CustomCode.ORIENTATION_RIGHT; this.state.orientation = GameLib.CustomCode.ORIENTATION_RIGHT;