Beispiel #1
0
    public override BaseView OpenWindow()
    {
        BaseView view = base.OpenWindow();

        if (mView == null)
        {
            mView = view as TenGameView;
        }
        return(view);
    }
Beispiel #2
0
    /// <summary>
    /// 显示互动表情
    /// </summary>
    /// <param name="chat"></param>
    protected 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;

        TenGameView view = Global.Inst.GetController <TenGameController>().mView;

        TenPlayerUI fromPlayer = null;
        TenPlayerUI 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);
        }
    }