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)); }
protected override void succesfullUserDataQuerry(GetUserDataResult result) { Dictionary<string, UserDataRecord> data = result.Data; deckList = JsonUtility.FromJson<DeckListWrapper>(data["DeckList"].Value); }
protected override void succesfullUserDataQuerry(GetUserDataResult result) { Dictionary <string, UserDataRecord> data = result.Data; deckList = JsonUtility.FromJson <DeckListWrapper>(data["DeckList"].Value); }