protected override void Awake() { _inputValueActions = GetComponentInChildren <InputValueActions>(); _inputButtonActions = GetComponentInChildren <InputButtonActions>(); base.Awake(); }
public void EnableButton(InputButtons button, InputButtonActions action) { switch (action) { case InputButtonActions.Down: buttonDownEvents.First(b => b.Key == button).Value.Enable(); break; case InputButtonActions.Hold: buttonHoldEvents.First(b => b.Key == button).Value.Enable(); break; case InputButtonActions.Up: buttonUpEvents.First(b => b.Key == button).Value.Enable(); break; } }
public void RegisterButton(InputButtons button, InputButtonActions action, Action callback) { switch (action) { case InputButtonActions.Down: buttonDownEvents.Add(button, new InputEvent(callback)); break; case InputButtonActions.Hold: buttonHoldEvents.Add(button, new InputEvent(callback)); break; case InputButtonActions.Up: buttonUpEvents.Add(button, new InputEvent(callback)); break; } }
public void DisableEvent(InputContexts context, InputButtons button, InputButtonActions action) { GetByContext(context).DisableButton(button, action); }
public void RegisterEvent(InputContexts context, InputButtons button, InputButtonActions action, Action callback) { GetByContext(context).RegisterButton(button, action, callback); }