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; } }
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; } }