Exemple #1
0
 public void addDeck(Deck deck)
 {
     if (!DeckList.Contains(deck))
     {
         DeckList.Add(deck);
     }
 }
Exemple #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);
    }
Exemple #3
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));
    }