public void OnCollisionEnter2D(Collision2D collision) { Debug.Log("colision"); if (collision.gameObject == Lead) { Debug.Log("lead"); Abierta.SetActive(true); Cerrada.SetActive(false); } }
public void OnEnable() { if (Player.GetComponent <CambioDisfraz>().miDisfraz == necesario) { Abierta.SetActive(true); Cerrada.SetActive(false); } else { GameManager.instance.AvisoPuertas(); this.gameObject.SetActive(false); } }