// Update is called once per frame void Update() { if (!eaten) { if (presenceCollider.GetStatus()) { detectedPlayer = presenceCollider.GetPlayerTag(); if (detectedPlayer == Utils.player2Tag && Input.GetButtonDown(Utils.player2AB1)) { GameObject.FindGameObjectWithTag(Utils.player2Tag).GetComponent <PlayerInventory>().Add(this.objectType); eaten = true; RemoveBerriesFromBush(); questManager.AddEatenBushes(this); } } } }