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

            if (action != null)
            {
                return(action.GetAxis(playerID));
            }
            else
            {
                Debug.LogError(string.Format("An axis named \'{0}\' does not exist in the active input configuration for player {1}", name, playerID));
                return(0.0f);
            }
        }
예제 #2
0
 static float NormalAxisQuery(InputAction action, int playerID)
 {
     return(action.GetAxis(playerID));
 }