public void Show(XXGlodFlowerPlayer player, float num) { eGFCardType type = player.GetCardType(); if (type != eGFCardType.Nil) { //mCardType.gameObject.SetActive(true); //mCardType.spriteName = "jinhua_" + (int)type; } else { //mCardType.gameObject.SetActive(false); } for (int i = 0; i < mHandCards.Length; i++) { if (player.GetHandCard().Count > i) { mHandCards[i].SetCard(player.GetHandCard()[i]); } } mXides.text = "吃喜了!金币+" + num + "个"; DelayRun(4, () => { Close <XXGoldFlowerXiQianWidget>(); }); }
public void Show(XXGlodFlowerPlayer player, float num, GoldFlowerCardsInfo cardsInfo) { eGFCardType type = (eGFCardType)cardsInfo.cardType; if (type != eGFCardType.Nil) { mCardType.gameObject.SetActive(true); mCardType.spriteName = "jinhua_" + (int)type; } else { mCardType.gameObject.SetActive(false); } for (int i = 0; i < mHandCards.Length; i++) { mHandCards[i].SetCard(cardsInfo.card[i]); } mWinPlayerNameLabel.text = XXGoldFlowerGameModel.Inst.mPlayerInfoDic[cardsInfo.seatId].nickname + "拿到"; mXides.text = "被吃喜了!金币-" + num + "个"; DelayRun(4, () => { Close <XXGoldFlowerLoseXiQianWidget>(); }); }
/// <summary> /// 显示互动表情 /// </summary> /// <param name="chat"></param> private void PlayHuDongFace(SendReceiveGameChat chat) { if (mGameInteractionView == null) { mGameInteractionView = Global.Inst.GetController <GameInteractionController>().OpenWindow() as GameInteractionView; } List <ConfigDada> config = ConfigManager.GetConfigs <TSTHuDongFaceConfig>(); TSTHuDongFaceConfig con = null; for (int i = 0; i < config.Count; i++) { TSTHuDongFaceConfig hdf = config[i] as TSTHuDongFaceConfig; if (hdf.id == chat.faceIndex) { con = hdf; break; } } //起始位置 Vector3 from = Vector3.zero; //目标位置 Vector3 to = Vector3.zero; XXGoldFlowerGameView view = Global.Inst.GetController <XXGoldFlowerGameController>().mView; XXGlodFlowerPlayer fromPlayer = null; XXGlodFlowerPlayer toPlayer = null; if (view.TryGetPlayer(chat.fromSeatId, out fromPlayer) && view.TryGetPlayer(chat.toSeatId, out toPlayer)) { from = fromPlayer.GetBaseInfoPos(); to = toPlayer.GetBaseInfoPos(); mGameInteractionView.AddOneInteractionFace(from, to, chat); } }