/// <summary>取消选中状态</summary> public void CancelSelectCard() { if (selectCardUnit != null) { selectCardUnit.SelectCard(false); selectCardUnit = null; } }
protected void Awake() { // 监听卡牌单位上的点击事件 OnMouseDown += MouseDown; OnMouseExit += MouseExit; OnMouseEnter += MouseEnter; task = new Task(MonitorOperation()); task.Pause(); cardUnit = GetComponentInChildren <ICardUnit>(true); select = transform.Find("select").gameObject; countermand = transform.Find("countermand").gameObject; countermandBut = countermand.GetComponent <Button>(); // 取消按钮 countermandBut.onClick.AddListener(() => { CountermandSynthesisCardSlot(); }); }
protected void Awake() { cardUnit = GetComponentInChildren <ICardUnit>(true); }