예제 #1
0
    public bool AddKeyBind(KeyCode[] keycode, KeydownAction action)
    {
        for (int i = 0; i < keycode.Length; i++)
        {
            if (!AddKeyBind(keycode[i], action))
            {
                return false;
            }
        }

        return true;
    }
예제 #2
0
    public bool AddKeyBind(KeyCode keycode, KeydownAction action)
    {
        if (actions.ContainsKey(keycode))
        {
            return false;
        }
        else
        {
            actions.Add(keycode, action);

            return true;
        }
    }