public InputAction(string name, InputItem.InputType type, float value, float lastValue) { Name = name; Type = type; Value = value; LastValue = lastValue; }
private bool IsValidInput(int action, InputItem.InputType type) { if (!inputsDic.ContainsKey(action)) { Debug.LogError($"There's no input action called '{action}' on '{gameObject.name}'.", gameObject); return(false); } if (inputsDic[action].Type != type) { Debug.LogError($"Input action '{action}' is a {inputsDic[action].Type} but should be a {type}."); return(false); } return(true); }
private bool IsValidInput(string action, InputItem.InputType type) { if (!inputsDic.ContainsKey(action)) { Debug.LogError("There's no input action called '" + action + "' on '" + gameObject.name + "'.", gameObject); return(false); } if (inputsDic[action].Type != type) { Debug.LogError("Input action '" + action + "' is a " + inputsDic[action].Type + " but should be a " + type + "."); return(false); } return(true); }