DW_ThirdPersonController.ApplyGravity C# (CSharp) Method

ApplyGravity() private method

private ApplyGravity ( ) : void
return void
    private void ApplyGravity() {
        if (_isControllable) // don't move player at all if not controllable.
        {
            // Apply gravity
            // When we reach the apex of the jump we send out a message
            if (_jumping && !_jumpingReachedApex && VerticalSpeed <= 0.0f) {
                _jumpingReachedApex = true;
                SendMessage("DidJumpReachApex", SendMessageOptions.DontRequireReceiver);
            }

            if (IsGrounded()) {
                VerticalSpeed = 0.0f;
            } else {
                VerticalSpeed -= Gravity * Time.deltaTime;
            }
        }
    }