Beispiel #1
0
        private void Update()
        {
            var xCoordinate = _paddleInput.GetPaddlePositionByInput();

            if (float.IsNaN(xCoordinate))
            {
                return;
            }
            var yCoordinate = _paddleTransform.position.y;

            _paddleController.MovePaddleHorizontal(new Vector2(xCoordinate, yCoordinate));
        }
Beispiel #2
0
        private void Update()
        {
            var xCoordinate = _paddleInput.UserInputForPaddle.GetInputPosition();

            if (float.IsNaN(xCoordinate))
            {
                return;
            }
            var yCoordinate = _paddleControllerParameters.PaddleTransform.position.y;

            _paddleController.MovePaddleHorizontal(new Vector2(xCoordinate, yCoordinate));
        }