namespace ET { public static class SceneFactory { public static Scene CreateZoneScene(int zone, string name, Entity parent) { Scene zoneScene = EntitySceneFactory.CreateScene(Game.IdGenerater.GenerateInstanceId(), zone, SceneType.Zone, name, parent); zoneScene.AddComponent(); zoneScene.AddComponent(SessionStreamDispatcherType.SessionStreamDispatcherClientOuter); zoneScene.AddComponent(); zoneScene.AddComponent(); zoneScene.AddComponent(); zoneScene.AddComponent(); zoneScene.AddComponent(); zoneScene.AddComponent(); Game.EventSystem.Publish(new EventType.AfterCreateZoneScene() {ZoneScene = zoneScene}); return zoneScene; } public static Scene CreateCurrentScene(long id, int zone, string name, CurrentScenesComponent currentScenesComponent) { Scene currentScene = EntitySceneFactory.CreateScene(id, IdGenerater.Instance.GenerateInstanceId(), zone, SceneType.Current, name, currentScenesComponent); currentScenesComponent.Scene = currentScene; Game.EventSystem.Publish(new EventType.AfterCreateCurrentScene() {CurrentScene = currentScene}); return currentScene; } } }