private bool HandleStateChange(ButtonEventTypes evt, bool hold, bool active) { switch (evt) { case ButtonEventTypes.Down: if (active) { active = false; } else { active = true; } break; case ButtonEventTypes.Up: if (!hold) { active = false; } break; } return(active); }
[Command] private void UpdateUse(ButtonEventTypes evt) => authoritativeInput.Use.Invoke(evt);
[Command] private void UpdateEquip(ButtonEventTypes evt) => authoritativeInput.Equip.Invoke(evt);
[Command] private void UpdateBlock(ButtonEventTypes evt) => authoritativeInput.Block.Invoke(evt);
[Command] private void UpdateAttackWeak(ButtonEventTypes evt) => authoritativeInput.AttackWeak.Invoke(evt);
[Command] private void UpdateCrouch(ButtonEventTypes evt) => authoritativeInput.Crouch.Invoke(evt);