private void OnTriggerEnter(Collider other) { string tag = other.tag; if (tag == "coin") { GS.addCoin(); //destroy the coin i hit Destroy(other.gameObject); } if (tag == "apple") { PC.shrink(); //destroy the apple i hit Destroy(other.gameObject); } if (tag == "laser") { LS.playerWasHit(); } }