Exemplo n.º 1
0
        public bool setData(ChatBubbleWndView view, uint uid, SChatMessageInfo info)
        {
            base.setData(info);

            m_View  = view;
            m_UID   = uid;
            m_Pdbid = info.senderPdbid;

            // 实体气泡,则更新位置
            m_EntityView = EntityFactory.getEntityViewByID((int)uid);

            // uid获取失败,则使用pdbid
            if (m_EntityView == null)
            {
                m_EntityView = getEntityViewByPdbid(info.senderPdbid);
            }

            if (m_EntityView == null || !m_EntityView.IsValid)
            {
                return(false);
            }

            m_EntryProperty = m_EntityView.GetComponent <CreatureProperty>();
            if (m_EntryProperty == null)
            {
                return(false);
            }

            // 设置初始位置
            updatePosition();

            return(true);
        }
Exemplo n.º 2
0
        public override void Clear()
        {
            base.Init();

            m_View          = null;
            m_UID           = 0;
            m_EntityView    = null;
            m_EntryProperty = null;
        }