Exemplo n.º 1
0
    public void Explode()
    {
        Passive t = Passive.Create(RootParticle.explosionOriginal, transform.position);

        if (gameObject.GetComponent <Renderer>() != null)
        {
            gameObject.GetComponent <Renderer>().enabled = false;
        }
        else
        {
            for (int i = 0; i < transform.childCount; i++)
            {
                if (transform.GetChild(i).transform.GetComponent <Renderer>() != null)
                {
                    transform.GetChild(i).transform.GetComponent <Renderer>().enabled = false;
                }
            }
        }
    }