From 8876d30a3f6ab4df08f2c3f1d3571e597f3a2de6 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Mon, 19 Mar 2018 08:30:00 +0100 Subject: [PATCH] Update: CC - Snake FS - Key Up (306204wy29.js) 185 bytes modified --- 306204wy29.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/306204wy29.js b/306204wy29.js index a4acc1e..6fdab8d 100644 --- a/306204wy29.js +++ b/306204wy29.js @@ -10,8 +10,8 @@ if (!this.initialized) { } if (this.state.turning) { - //console.warn('already turning - todo: store the input and play back'); - //return; + //console.warn('already turning - todo: store the input and play back'); + //return; } 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_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.turning = true; }