コード例 #1
0
 private void RefreshItem(PokerData data)
 {
     UserIdLabel.TrySetComponentValue(data.UserId);
     UserNameLabel.TrySetComponentValue(data.UserName);
     UserGoldLabel.TrySetComponentValue(YxUtiles.GetShowNumber(data.UserScore).ToString());
     ResultLabel.TrySetComponentValue(data.CardsValue);
     if (Pokers != null && data.Cards != null && Pokers.Count >= data.Cards.Count)
     {
         for (int i = 0; i < data.Cards.Count; i++)
         {
             Pokers[i].SetCardId(int.Parse(data.Cards[i].ToString()));
             Pokers[i].SetCardFront();
             Pokers[i].gameObject.SetActive(true);
         }
         for (int i = data.Cards.Count; i < Pokers.Count; i++)
         {
             Pokers[i].gameObject.SetActive(false);
         }
     }
 }
コード例 #2
0
        private void RefreshItem(Dictionary <string, object> dic)
        {
            var _data = new PokerData(dic);

            RefreshItem(_data);
        }