コード例 #1
0
    /// <summary>
    /// NPC选中时
    /// </summary>
    /// <param name="npcID">交互信息</param>
    private void OnNpcSelect(MsgInteractiveInfo msg)
    {
        int    npcID    = (int)msg.Tid;
        string describe = msg.Describe;

        m_MustUseHumanFBox = msg.MustUseHumanFBox;
        if (m_FocusNpcTid != npcID)
        {
            m_FocusNpcTid    = npcID;
            m_FocusNpcOffset = Vector3.zero;

            CfgEternityProxy eternity = Facade.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy;

            m_FocusNpcVO = eternity.GetNpcByKey((uint)m_FocusNpcTid);
            if (m_FocusNpcVO.FPosOffestLength >= 3)
            {
                m_FocusNpcOffset = new Vector3(m_FocusNpcVO.FPosOffest(0), m_FocusNpcVO.FPosOffest(1), m_FocusNpcVO.FPosOffest(2));
            }
        }
        RebuildView(describe);
    }