Exemplo n.º 1
0
    void OnCollisionEnter2D(Collision2D collision)
    {
        if (collision.gameObject.name.Equals("Border"))
        {
            Destroy(this.gameObject);

            if (this.gameObject.name.Equals("Virus(Clone)"))
            {
                healthControl.DecreaseLife();
            }

            if (this.gameObject.name.Equals("BigVirus(Clone)"))
            {
                healthControl.BigVirusDecreaseLife();
            }
        }
    }