Пример #1
0
        void SetMovementParameters(MovementArea movementArea)
        {
            CharacterMovementProfile data = movementArea.CharacterMovementData;

            if (data == null)
            {
                return;
            }

            if (data.horizontalMovementData != null)
            {
                this.horizontalData = data.horizontalMovementData;

                characterController2D.SetVelocityX(characterController2D.Velocity.x * data.horizontalMovementData.entrySpeedFactor);
            }
        }
Пример #2
0
        void SetMovementParameters(MovementArea movementArea)
        {
            CharacterMovementProfile data = movementArea.CharacterMovementData;

            if (data == null)
            {
                return;
            }

            if (data.verticalMovementData != null)
            {
                this.verticalData = data.verticalMovementData;
                CalculateGravityParameters();

                characterController2D.SetVelocityY(characterController2D.Velocity.y * data.verticalMovementData.entrySpeedMultiplier);
            }
        }