Update: CC - Snake FS - Key Up (306204wy29.js) 185 bytes modified
parent
0f00831ae4
commit
8876d30a3f
|
@ -10,8 +10,8 @@ if (!this.initialized) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.state.turning) {
|
if (this.state.turning) {
|
||||||
//console.warn('already turning - todo: store the input and play back');
|
//console.warn('already turning - todo: store the input and play back');
|
||||||
//return;
|
//return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.keyCode === GameLib.System.Input.KEY_UP) {
|
if (data.keyCode === GameLib.System.Input.KEY_UP) {
|
||||||
|
@ -71,6 +71,12 @@ 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) {
|
||||||
|
this.state.flip = true;
|
||||||
|
} else {
|
||||||
|
this.state.flip = false;
|
||||||
|
}
|
||||||
|
|
||||||
this.state.orientation = GameLib.CustomCode.ORIENTATION_LEFT;
|
this.state.orientation = GameLib.CustomCode.ORIENTATION_LEFT;
|
||||||
this.state.turning = true;
|
this.state.turning = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue