public void OnPickup(InputAction.CallbackContext context) { if (_gameManager && _gameManager.IsGameOver()) { _gameManager.ToScoreBoard(); } switch (_currentPlayerMode) { case PlayerMode.Walking: { // Check for button down/up state if (context.started) { // Check if player is already holding an item if (_equippedItem) { // Start throw timer _throwHoldTimer = holdThreshold / 1000.0f; } else { PickupObject(); } } else if (context.canceled) { // Check if player just picked up a new item if (!_justPickedUp) { _throwHoldTimer = 0.0f; // To throw it or not?? Hmmm? if (_throwItem) { Debug.Log("LMAO, MANZ ACTUALLY DID IT! XDDD"); // THROW IT! ThrowItem(); } else { PickupObject(); // You're lazy UnequipItem(); } } else { _justPickedUp = false; } } _throwItem = false; break; } case PlayerMode.Cashier: { if (!context.performed) { return; } _interactRegister.CashCustomerOut(); break; } case PlayerMode.Receiving: break; default: throw new ArgumentOutOfRangeException(); } }