private InputContext GetByContext(InputContexts context) { InputContext c; if (!contexts.TryGetValue(context, out c)) { Debug.LogError(String.Format("Input Manager doesn't have {0} context. That's not supposed to happen.", context.ToString())); return(null); } return(c); }
public void DisableEvent(InputContexts context, InputButtons button, InputButtonActions action) { GetByContext(context).DisableButton(button, action); }
public void RegisterEvent(InputContexts context, InputAxes axis, Action <float> callback) { currentContext.RegisterAxis(axis, callback); }
public void RegisterEvent(InputContexts context, InputButtons button, InputButtonActions action, Action callback) { GetByContext(context).RegisterButton(button, action, callback); }
public void SetContext(InputContexts newContext) { Context = newContext; contexts.TryGetValue(newContext, out currentContext); }
public void EnableEvent(InputContexts context, InputAxes axis) { GetByContext(context).EnableAxis(axis); }