Esempio n. 1
0
        public ComponentQueue(string typeName)
        {
            this.Id       = IdGenerater.GenerateId();
            this.TypeName = typeName;
#if !SERVER
            this.ViewGO       = new GameObject();
            this.ViewGO.name  = this.GetType().Name;
            this.ViewGO.layer = LayerNames.GetLayerInt(LayerNames.HIDDEN);
            this.ViewGO.transform.SetParent(Global.transform, false);
            this.ViewGO.AddComponent <ComponentView>().Component = this;
#endif
        }
Esempio n. 2
0
 public static Scene CreateScene(SceneType sceneType, string name, Scene parent = null,long id = 0)
 {
     Scene scene = (Scene)Game.ObjectPool.Fetch(typeof(Scene));
     scene.Id = id != 0 ? id : IdGenerater.GenerateId();
     scene.Name = name;
     scene.SceneType = sceneType;
     if (parent != null)
     {
         scene.Parent = parent;
     }
     scene.Domain = scene;
     return scene;
 }
Esempio n. 3
0
        protected Entity()
        {
            this.InstanceId = IdGenerater.GenerateId();

#if !SERVER
            if (!this.GetType().IsDefined(typeof(HideInHierarchy), true))
            {
                this.ViewGO       = new GameObject();
                this.ViewGO.name  = this.GetType().Name;
                this.ViewGO.layer = LayerNames.GetLayerInt(LayerNames.HIDDEN);
                this.ViewGO.transform.SetParent(Global.transform, false);
                this.ViewGO.AddComponent <ComponentView>().Component = this;
            }
#endif
        }
Esempio n. 4
0
 protected AChannel(AService service, ChannelType channelType)
 {
     this.Id          = IdGenerater.GenerateId();
     this.ChannelType = channelType;
     this.Service     = service;
 }