Exemple #1
0
        private SpaceInfoView GetSpaceInfoViewById(int objId)
        {
            SpaceInfoView view = null;

            if (m_SpaceInfoViews.ContainsKey(objId))
            {
                view = m_SpaceInfoViews[objId];
            }
            return(view);
        }
Exemple #2
0
        private SpaceInfoView CreateSpaceInfoView(int objId, bool isPlayer)
        {
            SpaceInfoView view = null;

            if (!m_SpaceInfoViews.ContainsKey(objId))
            {
                view = new SpaceInfoView();
                view.Create(objId, isPlayer);
                m_SpaceInfoViews.Add(objId, view);
            }
            return(view);
        }
Exemple #3
0
 private void DestroySpaceInfoView(int objId)
 {
     if (m_SpaceInfoViews.ContainsKey(objId))
     {
         SpaceInfoView view = m_SpaceInfoViews[objId];
         if (view != null)
         {
             view.Destroy();
         }
         m_SpaceInfoViews.Remove(objId);
     }
 }
Exemple #4
0
        public void UpdateSpaceInfoView(int objId, bool isPlayer, float x, float y, float z, float dir)
        {
            SpaceInfoView view = GetSpaceInfoViewById(objId);

            if (null == view)
            {
                view = CreateSpaceInfoView(objId, isPlayer);
            }
            if (null != view)
            {
                view.NeedDestroy = false;
                view.Update(x, y, z, dir);
            }
        }