private void OnClickMaterialCardSlot(MaterialCardSlotData data, MaterialCardSlot slot) { var selected = selectedCardDataList.FirstOrDefault(d => d.CardData.UserCard.UserCardId == data.CardData.UserCard.UserCardId); if (selected == null) { if (initData.LimitCount <= selectedCardDataList.Count) { return; } selectedCardDataList.Add(data); } else { selectedCardDataList.RemoveAll(r => r.CardData.UserCard.UserCardId == data.CardData.UserCard.UserCardId); data.SelectedIndex = 0; } UpdateCardSelection(); }
private void DestroyMaterialCardSlot(MaterialCardSlot slot) { Destroy(slot.gameObject); }