Ejemplo n.º 1
0
    private void UpdateAbility(Ability ability, InputManager.InputPressType pressType)
    {
        switch (pressType)
        {
        case InputManager.InputPressType.None:
            break;

        case InputManager.InputPressType.FirstPress:
            ability.AbilityPressed();
            break;

        case InputManager.InputPressType.Held:
            ability.AbilityHeld();
            break;

        case InputManager.InputPressType.Release:
            ability.AbilityRelease();
            break;

        default:
            Debug.LogError("Unhandled switch: " + pressType);     //Always catch an error
            break;
        }
        ability.AbilityUpdate();
    }