if (!this.entityLoaded) { return; } if (!this.initialized) { this.direction = this.entityLoaded.direction; this.initialized = true; } if (data.keyCode === GameLib.System.Input.KEY_UP) { this.direction.y = 1; this.direction.x = 0; } if (data.keyCode === GameLib.System.Input.KEY_DOWN) { this.direction.y = -1; this.direction.x = 0; } if (data.keyCode === GameLib.System.Input.KEY_LEFT) { this.direction.y = 0; this.direction.x = -1; } if (data.keyCode === GameLib.System.Input.KEY_RIGHT) { this.direction.y = 0; this.direction.x = 1; } console.log(data); //@ sourceURL=keyUp.js