public static bool GetButtonDown(string name) { AxisConfiguration axisConfig = GetAxisConfiguration(_instance._currentConfiguration.name, name); if (axisConfig == null) { throw new ArgumentException(string.Format("An button named \'{0}\' does not exist in the active input configuration", name)); } return(axisConfig.GetButtonDown()); }
public static bool GetButtonDown(string name) { AxisConfiguration axisConfig = GetAxisConfiguration(name); if (axisConfig == null) { string error = "The active input configuration doesn't contain a button named " + name; throw new ArgumentException(error); } return(axisConfig.GetButtonDown()); }
public static bool GetButtonDown(string name, PlayerID playerID = PlayerID.One) { AxisConfiguration axisConfig = GetAxisConfiguration(playerID, name); if (axisConfig != null) { return(axisConfig.GetButtonDown()); } else { Debug.LogError(string.Format("An button named \'{0}\' does not exist in the active input configuration for player {1}", name, playerID)); return(false); } }