Beispiel #1
0
    public void ClickEditDeckNameButton()
    {
        if (curSelectedMainSlot == null)
        {
            return;
        }

        var newName = deckEditNameInput.label.text;

        tempDeckData.ChangeDeckName(newName);

        var deckDataDic = DeckManager.Instance.DeckDic;

        int index = curSelectedMainSlot.Index;

        if (deckDataDic.ContainsKey(index))
        {
            deckDataDic[index].ChangeDeckName(tempDeckData.DeckName);
        }
        else
        {
            DeckManager.Instance.AddNewDeck(index, tempDeckData);
        }
    }