Example #1
0
 public void Remover()
 {
     screen = Camera.main.WorldToScreenPoint(transform.position);
     if (isDead && screen.y < minY)
     {
         Destroy(gameObject);
         if (gameObject.tag == "Goodfood")
         {
             if (!vidas.Remover())
             {
                 pontos.Recorde();
             }
         }
     }
     else
     {
         isDead = true;
     }
 }
Example #2
0
 public void Remover()
 {
     screen = Camera.main.WorldToScreenPoint(transform.position);
     if (isdead && screen.y < minY)
     {
         Destroy(gameObject);
         if (!vida.Remover())
         {
             GetComponent <Collider2D>().enabled = false;
             pontos.Recorde();
         }
     }
     else
     {
         isdead = true;
     }
 }