public void MoveTo(ref CardBox box, int cardIndex) { box.Add(cards[cardIndex]); RemoveAt(cardIndex); GameObject.Find(SoundPlayer.objectName).GetComponent <SoundPlayer>().PlaySE( SEname.Turn); }
void AddTrumpSetToDeck() { for (int i = 0; i < 4; i++) { for (int j = 2; j <= 14; j++) { deckCards.Add(new Card(i, j)); } } }
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(); }