public void ClickDeckSlot(DeckSlotUI slot) { curSelectedMainSlot?.ActiveHighlight(false); curSelectedMainSlot = slot; curSelectedMainSlot?.ActiveHighlight(true); string infoText = "비어있음"; Dictionary <int, CharacterData> dataDic = null; if (curSelectedMainSlot.Data != null) { dataDic = curSelectedMainSlot.Data.DataDic; infoText = curSelectedMainSlot.Data.DeckSynergyText; } mainInfoLabel.text = infoText; for (int i = 0; i < mainInfoSlotUIArray.Length; i++) { CharacterData charData = null; string slotName = "없음"; if (dataDic != null && dataDic.ContainsKey(i)) { charData = dataDic[i]; slotName = charData.NAME; } mainInfoSlotUIArray[i].Init(i, charData, slotName, null); } }
public void ClickDeckSlot(DeckSlotUI deckSlot) { curSelectedMainSlot?.ActiveHighlight(false); curSelectedMainSlot = deckSlot; curSelectedMainSlot?.ActiveHighlight(true); int deckIndex = curSelectedMainSlot.Index; DeckManager.Instance.ChangeUseDeck(deckIndex); }