示例#1
0
        public ObjectPool()
        {
#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
        }
示例#2
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);
#endif
        }
示例#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);
            }
#endif
        }