1234567891011121314151617181920212223242526272829303132 |
- using System.Collections;
- using GFGGame;
- using UnityEngine;
- namespace ET
- {
- public 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<ZoneSceneFlagComponent>();
- zoneScene.AddComponent<NetKcpComponent, int>(SessionStreamDispatcherType.SessionStreamDispatcherClientOuter);
- zoneScene.AddComponent<CurrentScenesComponent>();
- zoneScene.AddComponent<ObjectWait>();
- zoneScene.AddComponent<PlayerComponent>();
- zoneScene.AddComponent<AccountInfoComponent>();
- zoneScene.AddComponent<ServerInfosComponent>();
- zoneScene.AddComponent<RoleInfosComponent>();
- zoneScene.AddComponent<SessionComponent>();
- zoneScene.AddComponent<LogSplicingComponent>();
- return zoneScene;
- }
- public static Scene CreateCurrentScene(long id, int zone, string name, CurrentScenesComponent currentScenesComponent)
- {
- Scene currentScene = EntitySceneFactory.CreateScene(id, zone, SceneType.Current, name, currentScenesComponent);
- currentScenesComponent.Scene = currentScene;
- return currentScene;
- }
- }
- }
|