public void PlayCard(GameObject g) { Debug.Log("CHAMOU METODO ATACAR CARTA"); if (parent.selected == true) { if (cardcontroller == null) { cardcontroller = (CardController)parent.GetComponent("CardController"); } Debug.Log("CARTA ATACA CARTA"); if (parent.podeAtacar == true) { Debug.Log("ESTA ATACANDO"); parent.podeAtacar = false; parent.PlayCard(); parent.Deselect(); target = g; Debug.Log(target); CardController status = (CardController)target.GetComponent("CardController"); CardController statusparent = (CardController)parent.GetComponent("CardController"); status.DealDamage((int)ataque); parent.DealDamage((int)status.ataque); EventManager.Instance.OnTargetSelect -= PlayCard; } } }