public WorldEntity GetWorldByUnit(Unit u) { WorldEntity w = null; if (mWorldDic.TryGetValue(u.Id, out w)) { return(w); } else { return(null); } }
public static WorldEntity Create() { WorldManagerComponent worldManagerComponent = ETModel.Game.Scene.GetComponent <WorldManagerComponent>(); if (worldManagerComponent == null) { worldManagerComponent = ETModel.Game.Scene.AddComponent <WorldManagerComponent>(); } WorldEntity worldEntity = ComponentFactory.Create <WorldEntity>(); Debug.Log(worldManagerComponent == null); Debug.Log(worldEntity == null); worldManagerComponent.AddWorld(worldEntity); return(worldEntity); }
public void SetWorldEntity(WorldEntity w) { mWorldEntity = w; }
public void InitWorldEntity(WorldEntity w) { mWorldEntity = w; mFrameComponent.SetWorldEntity(w); }
public void AddUnitToWorld(Unit u, WorldEntity world) { mWorldDic.Add(u.Id, world); world.AddUnit(u); }
public void AddWorld(WorldEntity entity) { mEntityList.Add(entity); }