public override BaseView OpenWindow() { BaseView view = base.OpenWindow(); if (mView == null) { mView = view as XXGoldFlowerGameView; } return(view); }
/// <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); } }