private Create ( |
||
entity | ||
Résultat | void |
public void CreateEntityView(int objId) { if (objId <= 0) { LogSystem.Error("Error:CreateEntityView objId<=0 !!!"); Helper.LogCallStack(); return; } if (!m_EntityViews.ContainsKey(objId)) { EntityInfo obj = PluginFramework.Instance.EntityManager.GetEntityInfo(objId); if (null != obj) { EntityViewModel view = new EntityViewModel(); view.Create(obj); m_EntityViews.Add(objId, view); if (null != view.Actor) { if (m_Object2Ids.ContainsKey(view.Actor)) { m_Object2Ids[view.Actor] = objId; } else { m_Object2Ids.Add(view.Actor, objId); } } else { LogSystem.Warn("CreateEntityView:{0}, model:{1}, actor is null", objId, obj.GetModel()); } } } }
internal void CreateEntityView(int objId) { if (objId <= 0) { LogSystem.Error("Error:CreateEntityView objId<=0 !!!"); Helper.LogCallStack(); return; } if (!m_EntityViews.ContainsKey(objId)) { EntityInfo obj = ClientModule.Instance.EntityManager.GetEntityInfo(objId); if (null != obj) { EntityViewModel view = new EntityViewModel(); view.Create(obj); m_EntityViews.Add(objId, view); if (null != view.Actor) { if (m_Object2Ids.ContainsKey(view.Actor)) { m_Object2Ids[view.Actor] = objId; } else { m_Object2Ids.Add(view.Actor, objId); } } else { LogSystem.Warn("CreateEntityView:{0}, model:{1}, actor is null", objId, obj.GetModel()); } } } }
static public int Create(IntPtr l) { try { GameFramework.EntityViewModel self = (GameFramework.EntityViewModel)checkSelf(l); GameFramework.EntityInfo a1; checkType(l, 2, out a1); self.Create(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }