private void OnTriggerEnter2D(Collider2D other) { if (other.GetComponent <CharacterMovement>() != null) { soundPlayer.PlayExplosionSound(); scoreTracker.AddBomb(); Disappear(); } else if (other.GetComponentInParent <CollectAllPower>() != null) { // sound played by collectallpower script Disappear(); } }