private SpaceInfoView GetSpaceInfoViewById(int objId) { SpaceInfoView view = null; if (m_SpaceInfoViews.ContainsKey(objId)) { view = m_SpaceInfoViews[objId]; } return(view); }
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); }
private void DestroySpaceInfoView(int objId) { if (m_SpaceInfoViews.ContainsKey(objId)) { SpaceInfoView view = m_SpaceInfoViews[objId]; if (view != null) { view.Destroy(); } m_SpaceInfoViews.Remove(objId); } }
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); } }