/// <summary> /// 获得翻牌结果 /// </summary> /// <param name="data"></param> public void GetCardsResult(ISFSObject data) { if (data == null) { return; } CardInfos = new List <CardsData>(); TrendData newData = new TrendData(); int zhuangScore = 0; int xianScore = 0; if (data.ContainsKey(ConstantData.KeyZhuang)) { CardsData zhuangInfo = new CardsData(CardResultType.Zhuang, data.GetSFSObject(ConstantData.KeyZhuang)); newData.ZhuangDui = zhuangInfo.DoubleCard; newData.ZhuangTian = zhuangInfo.King; CardInfos.Add(zhuangInfo); zhuangScore = zhuangInfo.Result; } if (data.ContainsKey(ConstantData.KeyXian)) { var xianInfo = new CardsData(CardResultType.Xian, data.GetSFSObject(ConstantData.KeyXian)); newData.XianDui = xianInfo.DoubleCard; newData.XianTian = xianInfo.King; CardInfos.Add(xianInfo); xianScore = xianInfo.Result; } if (zhuangScore == xianScore) { newData.Win = ConstantData.KeyBetEqual; } else { newData.Win = zhuangScore > xianScore ? ConstantData.KeyBetBanker : ConstantData.KeyBetLeisure; } if (Record == null) { Record = new List <TrendData>(); } Record.Add(newData); }
/// <summary> /// 显示牌面信息 /// </summary> /// <param name="cardsInfo"></param> private void GetCardsResult(CardsData cardsInfo) { _showIndex = 0; _totalValue = 0; _cards = cardsInfo.Cards; _cardNum = cardsInfo.CardNum; if (Type == CardResultType.Xian) { Facade.EventCenter.DispatchEvent(LocalRequest.LeisureDouble, _cardNum == 2); } ResultScore.gameObject.SetActive(true); if (_playModel == ConstantData.KeyQuickModel) { var count = _cards.Count; for (int i = 0; i < count; i++) { var value = _cards[i]; if (value != 0) { var realValue = value % 16; if (realValue >= 10) { realValue = 0; } _totalValue = (realValue + _totalValue) % 10; Cards[i].QucikPlay(value); ResultScore.TrySetComponentValue(string.Format(ResultFormat, _totalValue)); } } StartCoroutine(OnCardShowFinish.WaitExcuteCalls()); } else { InvokeRepeating("ShowCardItem", DelayTime, CardOpenFrame); } }