private void OnParticleCollision(GameObject other) { if (other.CompareTag("PlacaPetri")) { //SpriteRenderer fungusSprite = other.GetComponent<SpriteRenderer>(); //CircleCollider2D fungusCollider = other.GetComponent<CircleCollider2D>(); //fungusSprite.enabled = false; //fungusCollider.enabled = false; // StartCoroutine(FungusReturn(fungusSprite, fungusCollider)); inhibitionPetri = other.GetComponent <InhibitionPetri>(); inhibitionPetri.Inhibited(); DestroyAllFungus(); } //if (other.CompareTag("PlacaPetri")) //{ // inhibitionPetri = other.GetComponent<InhibitionPetri>(); // inhibitionPetri.Inhibited(); //} }
private void OnParticleCollision(GameObject other) { if (other.CompareTag("Fungus")) { SpriteRenderer fungusSprite = other.GetComponent <SpriteRenderer>(); CircleCollider2D fungusCollider = other.GetComponent <CircleCollider2D>(); fungusSprite.enabled = false; fungusCollider.enabled = false; StartCoroutine(FungusReturn(fungusSprite, fungusCollider)); } else if (other.CompareTag("PlacaPetri")) { inhibitionPetri = other.GetComponent <InhibitionPetri>(); inhibitionPetri.Inhibited(); } else if (other.CompareTag("BalaoQuebrado")) { other.GetComponent <BalaoQuebrado>().FillVolumetric(); } }