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

        deckList = JsonUtility.FromJson <DeckListWrapper>(data["DeckList"].Value);
    }