public void OnCardSelected(CraftableCardUI selected, CardSource cs) { //已被选的话则取消选中 //Debug.Log("CUIList的数量是"+CUIList.Count); if (selected.IsSelect) { selected.EnhanceSelected(); selectedCardSource = null; //Debug.Log("你取消选中了"+selected.name); return; } //为被选的话把其它卡牌都取消选中,然后选中自己 foreach (CraftableCardUI CUI in CUIList) { CUI.EnhanceSelected(); } selected.ShowSelected(); //Debug.Log("你选中了"+selected.name); selectedCardSource = cs; }
public void OnCardSelected(CraftableCardUI selected, CardSource cs) { //已被选的话则取消选中 //Debug.Log("CUIList的数量是"+CUIList.Count); if (selected.IsSelect) { selected.EnhanceSelected(); CraftManager.Ins.targetCard = null; //Debug.Log("你取消选中了"+selected.name); return; } //为被选的话把其它卡牌都取消选中,然后选中自己 foreach (Transform tf in UpgradeChooseListPos) { tf.GetComponent <CraftableCardUI>().EnhanceSelected(); } selected.ShowSelected(); //Debug.Log("你选中了"+selected.name); CraftManager.Ins.SetTargetCard(cs); }