Update: CC - Snake FS - Key Up (306204wy29.js) 197 bytes modified
parent
5f5429f814
commit
ea07c813c7
|
@ -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_UP ||
|
||||||
this.state.orientation === GameLib.CustomCode.ORIENTATION_DOWN
|
this.state.orientation === GameLib.CustomCode.ORIENTATION_DOWN
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if (this.state.orientation === GameLib.CustomCode.ORIENTATION_DOWN) {
|
if (this.state.orientation === GameLib.CustomCode.ORIENTATION_DOWN) {
|
||||||
this.state.flip = true;
|
this.state.flip = true;
|
||||||
} else {
|
} 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_UP ||
|
||||||
this.state.orientation === GameLib.CustomCode.ORIENTATION_DOWN
|
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.orientation = GameLib.CustomCode.ORIENTATION_RIGHT;
|
||||||
this.state.turning = true;
|
this.state.turning = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue