public void addDeck(Deck deck) { if (!DeckList.Contains(deck)) { DeckList.Add(deck); } }
public IEnumerator saveDeck(Deck deck) { Player player = Player.getInstance(); deckList = player.DeckList; if (!deckList.Contains(deck)) deckList.Add(deck); UpdateUserDataRequest request = new UpdateUserDataRequest() { Data = new Dictionary<string, string>(){ {"DeckList", JsonUtility.ToJson(deckList)}, } }; yield return saveUserData(request); }
public IEnumerator saveDeck(Deck deck) { Player player = Player.getInstance(); deckList = player.DeckList; if (!deckList.Contains(deck)) { deckList.Add(deck); } UpdateUserDataRequest request = new UpdateUserDataRequest() { Data = new Dictionary <string, string>() { { "DeckList", JsonUtility.ToJson(deckList) }, } }; yield return(saveUserData(request)); }