void ItemInteractionInput() { if (_itemBufferTimer > Time.time) { return; // Prevents unwanted spawm use/pickup. } if (_cantUse) { return; // Player is standing on another item } // Ammo if (_hasAmmo && _player.GetButton("Interact")) { _ammoItem.use(); _hasAmmo = false; _itemBufferTimer = Time.time + _itemBufferCD; } else if (_hasAmmo && _player.GetButton("DropItem")) { _ammoItem.gameObject.SetActive(true); _ammoItem.transform.position = new Vector3(transform.position.x, transform.position.y + 1f, transform.position.z); _ammoItem.player = null; _ammoItem = null; _hasAmmo = false; _itemBufferTimer = Time.time + _itemBufferCD; } // Healing if (_hasHealing && _player.GetButton("Interact")) { _healingItem.use(); _hasHealing = false; _itemBufferTimer = Time.time + _itemBufferCD; } else if (_hasHealing && _player.GetButton("DropItem")) { _healingItem.gameObject.SetActive(true); _healingItem.transform.position = new Vector3(transform.position.x, transform.position.y + 1f, transform.position.z); _healingItem.player = null; _healingItem = null; _hasHealing = false; _itemBufferTimer = Time.time + _itemBufferCD; } }