Пример #1
0
 public void MoveTo(ref CardBox box, int cardIndex)
 {
     box.Add(cards[cardIndex]);
     RemoveAt(cardIndex);
     GameObject.Find(SoundPlayer.objectName).GetComponent <SoundPlayer>().PlaySE(
         SEname.Turn);
 }
Пример #2
0
 void AddTrumpSetToDeck()
 {
     for (int i = 0; i < 4; i++)
     {
         for (int j = 2; j <= 14; j++)
         {
             deckCards.Add(new Card(i, j));
         }
     }
 }
Пример #3
0
    void DownloadMyHandDB(Firebase.Database.DataSnapshot handSnap)
    {
        int handCnt = (int)handSnap.ChildrenCount;

        handCards.RemoveAll(x => true);
        for (int i = 0; i < handCnt; i++)
        {
            Firebase.Database.DataSnapshot cardRef
                = handSnap.Child(Card.dbName + i.ToString());
            int markNo = int.Parse(cardRef.Child("markNo").GetRawJsonValue());
            int value  = int.Parse(cardRef.Child("value").GetRawJsonValue());
            //Debug.Log(string.Format("{0}:{1}", markNo, value));
            handCards.Add(new Card(markNo, value));
        }
        //handCards.SyncCardObjects();
    }