コード例 #1
0
ファイル: ObjectPool.cs プロジェクト: x1766233/DCET
        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
ファイル: ObjectPool.cs プロジェクト: x1766233/DCET
        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
        }
コード例 #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
        }