diff --git a/306204wy29.js b/306204wy29.js index 334326d..b1408d6 100644 --- a/306204wy29.js +++ b/306204wy29.js @@ -11,7 +11,21 @@ if (data.keyCode === GameLib.System.Input.KEY_UP) { if (this.direction.y === -1) { return; } - this.direction.y = 1; + + if (this.direction.y === 1) { + return; + } + + if (this.direction.x === 1) { + this.direction.y = 1; + this.rotation += Math.PI / 2; + } + + if (this.direction.x === -1) { + this.direction.y = 1; + this.rotation -= Math.PI / 2; + } + this.direction.x = 0; }