Пример #1
0
    private void FixedUpdate()
    {
        Launching();
        Bouncing();
        Boosting();
        OnMovingObject();


        if (!_controller.dead)
        {
            currentState = CurrentState.alive;
            if (_movementEnabled)
            {
                _controller.Move(_cubeInfoSO.speed + _extraSpeed + _movingObjectDirection.x, _moveDirection);

                if (!_holdingJump)
                {
                    _controller.Step(_moveDirection, 1f);
                }
                if (_groundJumpActive && !_inLauncher && !_inBouncer)
                {
                    _controller.Jump(_realJumpForce, _holdingJump, ref _distanceReached);
                }
            }
        }
    }