public static Scene CreateScene(long id, string name, SceneType sceneType, Scene parent = null) { Scene scene = (Scene)Game.ObjectPool.Fetch(typeof(Scene)); scene.Id = id; Game.EventSystem.Remove(scene.InstanceId); // 高14位是进程id scene.InstanceId = IdGenerater.GenerateSceneInstanceId(id); Game.EventSystem.RegisterSystem(scene); if (parent != null) { scene.Parent = parent; } scene.Domain = scene; scene.Name = name; scene.SceneType = sceneType; return scene; }
protected AChannel(AService service, ChannelType channelType) { this.Id = IdGenerater.GenerateId(); this.ChannelType = channelType; this.Service = service; }