Beispiel #1
0
    public static void InputFish(AbilityHandleType handleType, Action <string, bool> callBack)
    {
        if (handleType == AbilityHandleType.PRESS)  // 只处理 Down、Up
        {
            return;
        }

        int index = (handleType == AbilityHandleType.DOWN) ? 0 : 1;

        for (int i = 0; i < fishArr.Length; ++i)
        {
            if (null != callBack)
            {
                callBack(fishArr[i], (i == index));
            }
        }
    }
Beispiel #2
0
    public static void Input(AbilityButtonType buttonType, AbilityHandleType handleType, Action <string, bool> callBack)
    {
        if (handleType == AbilityHandleType.PRESS)  // 只处理 Down、Up
        {
            return;
        }

        string[] nameArr = null;;
        if (!_btnDic.TryGetValue(buttonType, out nameArr))
        {
            return;
        }

        int index = (handleType == AbilityHandleType.DOWN) ? 0 : 1;

        for (int i = 0; i < nameArr.Length; ++i)
        {
            if (null != callBack)
            {
                callBack(nameArr[i], (i == index));
            }
        }
    }