public static SgtAccretionModel Create(SgtAccretion accretion)
        {
            var model = SgtComponentPool <SgtAccretionModel> .Pop(accretion.transform, "Accretion Model", accretion.gameObject.layer);

            model.Accretion = accretion;

            return(model);
        }
Esempio n. 2
0
        public static SgtLightning Create(SgtLightningSpawner lightningSpawner)
        {
            var model = SgtComponentPool <SgtLightning> .Pop(lightningSpawner.transform, "Lightning", lightningSpawner.gameObject.layer);

            model.LightningSpawner = lightningSpawner;

            return(model);
        }
        public static SgtFlareModel Create(SgtFlare flare)
        {
            var model = SgtComponentPool <SgtFlareModel> .Pop(flare.transform, "Flare Model", flare.gameObject.layer);

            model.Flare = flare;

            return(model);
        }
        public static SgtCloudsphereModel Create(SgtCloudsphere cloudsphere)
        {
            var model = SgtComponentPool <SgtCloudsphereModel> .Pop(cloudsphere.transform, "Cloudsphere Model", cloudsphere.gameObject.layer);

            model.Cloudsphere = cloudsphere;

            return(model);
        }
        public static SgtJovianModel Create(SgtJovian jovian)
        {
            var model = SgtComponentPool <SgtJovianModel> .Pop(jovian.transform, "Jovian Model", jovian.gameObject.layer);

            model.Jovian = jovian;

            return(model);
        }
Esempio n. 6
0
        public static SgtRingModel Create(SgtRing ring)
        {
            var segment = SgtComponentPool <SgtRingModel> .Pop(ring.transform, "Ring Model", ring.gameObject.layer);

            segment.Ring = ring;

            return(segment);
        }
Esempio n. 7
0
        public static SgtAtmosphereModel Create(SgtAtmosphere atmosphere)
        {
            var outer = SgtComponentPool <SgtAtmosphereModel> .Pop(atmosphere.transform, "Atmosphere Model", atmosphere.gameObject.layer);

            outer.Atmosphere = atmosphere;

            return(outer);
        }
        public static SgtProminenceModel Create(SgtProminence prominence)
        {
            var plane = SgtComponentPool <SgtProminenceModel> .Pop(prominence.transform, "Prominence Model", prominence.gameObject.layer);

            plane.Prominence = prominence;

            return(plane);
        }
        public static SgtCoronaModel Create(SgtCorona corona)
        {
            var model = SgtComponentPool <SgtCoronaModel> .Pop(corona.transform, "Corona Model", corona.gameObject.layer);

            model.Corona = corona;

            return(model);
        }
Esempio n. 10
0
        public static SgtQuadsModel Create(SgtQuads quads)
        {
            var model = SgtComponentPool <SgtQuadsModel> .Pop(quads.transform, "Quads Model", quads.gameObject.layer);

            model.Quads = quads;

            return(model);
        }
Esempio n. 11
0
        public static SgtSingularityModel Create(SgtSingularity singularity)
        {
            var model = SgtComponentPool <SgtSingularityModel> .Pop(singularity.transform, "Singularity Model", singularity.gameObject.layer);

            model.Singularity = singularity;

            return(model);
        }
Esempio n. 12
0
        public static SgtAuroraModel Create(SgtAurora aurora)
        {
            var model = SgtComponentPool <SgtAuroraModel> .Pop(aurora.transform, "Aurora Model", aurora.gameObject.layer);

            model.Aurora = aurora;

            return(model);
        }
Esempio n. 13
0
        private static SgtTerrainObject Spawn(SgtTerrainObject prefab)
        {
            if (prefab.Pool == true)
            {
                targetPrefab = prefab;

                var clone = SgtComponentPool <SgtTerrainObject> .Pop(ObjectMatch);

                if (clone != null)
                {
                    return(clone);
                }
            }

            return(Instantiate(prefab));
        }
Esempio n. 14
0
        private SgtDebris Spawn(SgtDebris prefab)
        {
            if (prefab.Pool == true)
            {
                targetPrefab = prefab;

                var debris = SgtComponentPool <SgtDebris> .Pop(DebrisMatch);

                if (debris != null)
                {
                    debris.transform.SetParent(null, false);

                    return(debris);
                }
            }

            return(Instantiate(prefab));
        }
        private SgtDebris Spawn(SgtDebris prefab)
        {
            if (prefab.Pool == true)
            {
                targetPrefab = prefab;

                var debris = SgtComponentPool <SgtDebris> .Pop(DebrisMatch);

                if (debris != null)
                {
                    debris.transform.SetParent(null, false);

                    return(debris);
                }
            }

            var clone = Instantiate(prefab);

            clone.gameObject.SetActive(true);

            return(clone);
        }
Esempio n. 16
0
 public static SgtTerrainFace Create(string name, int layer, Transform parent)
 {
     return(SgtComponentPool <SgtTerrainFace> .Pop(parent, name, layer));
 }