public static bool GetButtonDown(string name, int playerID = 0)
        {
            InputAction action = GetAction(playerID, name);

            if (action != null)
            {
                return(action.GetButtonDown(playerID));
            }
            else
            {
                Debug.LogError(string.Format("An button named \'{0}\' does not exist in the active input configuration for player {1}", name, playerID));
                return(false);
            }
        }
Exemplo n.º 2
0
 static bool ButtonDownQuery(InputAction action, int playerID)
 {
     return(action.GetButtonDown(playerID));
 }