private void Update() { if (gameOver) { return; } if (Input.GetButtonUp("Cancel")) { _gameController.PauseGame(); } this.x = Input.GetAxis("Horizontal"); Move(); Vector3 _pos = _transform.position; float scaleX = _transform.localScale.x; bound = 103f - (BASE_WIDTH * scaleX / 2); _transform.position = new Vector3(Mathf.Clamp(_pos.x, -bound, bound), _pos.y, 0); }