Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public ComponentQueue(string typeName)
 {
     this.Id       = IdGenerater.GenerateId();
     this.TypeName = typeName;
 }
Esempio n. 3
0
 protected Entity()
 {
     this.InstanceId = IdGenerater.GenerateId();
 }
Esempio n. 4
0
 protected AChannel(AService service, ChannelType channelType)
 {
     this.Id          = IdGenerater.GenerateId();
     this.ChannelType = channelType;
     this.Service     = service;
 }