Пример #1
0
    protected virtual void Start()
    {
        interact = GameController.Instance.PlayControl;
        movement = movementSystem.LoadMovement(interact);

        if (swimming != null)
        {
            swimming.LoadMovement(interact);
        }

        if (platformerSpecials != null)
        {
            platformerSpecials.LoadKeys(interact);
        }

        if (combatSystem != null)
        {
            combatSystem.LoadAttack(interact);
        }

        if (movement == Movement.MovementType.PLATFORMER && !interact.ContainsValue(UserInput.JUMP) ||
            movement == Movement.MovementType.TOPDOWN && !(interact.ContainsValue(UserInput.MOVEUP) || interact.ContainsValue(UserInput.MOVEDOWN)))
        {
            Debug.LogWarning("The Movement options don't agree with the movement type, please double check everything");
        }
    }