BB.BallController.Update C# (CSharp) Method

Update() private method

private Update ( ) : void
return void
        void Update()
        {
            var velocityX = Ball.Rigidbody.velocity.x;

            if (InputManager._.IsRightPressed)
            {
                if (velocityX < SpeedLimit)
                    Ball.Rigidbody.AddForce(new Vector2(Force, 0));
            }

            if (InputManager._.IsLeftPressed)
            {
                if (velocityX > -SpeedLimit)
                    Ball.Rigidbody.AddForce(new Vector2(-Force, 0));
            }
        }
BallController