public static SgtProminencePlane Create(SgtProminence prominence) { var plane = SgtComponentPool <SgtProminencePlane> .Pop(prominence.transform, "Plane", prominence.gameObject.layer); plane.Prominence = prominence; return(plane); }
public static SgtSingularityModel Create(SgtSingularity singularity) { var model = SgtComponentPool <SgtSingularityModel> .Pop("Model", singularity.gameObject.layer, singularity.transform); model.Singularity = singularity; return(model); }
public static SgtStarfieldGroup Create(SgtStarfield starfield) { var group = SgtComponentPool <SgtStarfieldGroup> .Pop("Group", starfield.transform); group.Starfield = starfield; return(group); }
public static SgtLightning Create(SgtLightningSpawner lightningSpawner) { var model = SgtComponentPool <SgtLightning> .Pop(lightningSpawner.transform, "Lightning", lightningSpawner.gameObject.layer); model.LightningSpawner = lightningSpawner; return(model); }
public static SgtRingSegment Create(SgtRing ring) { var segment = SgtComponentPool <SgtRingSegment> .Pop("Segment", ring.transform); segment.Ring = ring; return(segment); }
public static SgtCoronaOuter Create(SgtCorona corona) { var outer = SgtComponentPool <SgtCoronaOuter> .Pop("Outer", corona.transform); outer.Corona = corona; return(outer); }
public static SgtJovianModel Create(SgtJovian jovian) { var model = SgtComponentPool <SgtJovianModel> .Pop(jovian.transform, "Jovian Model", jovian.gameObject.layer); model.Jovian = jovian; return(model); }
public static SgtAuroraModel Create(SgtAurora aurora) { var model = SgtComponentPool <SgtAuroraModel> .Pop(aurora.transform, "Plane", aurora.gameObject.layer); model.Aurora = aurora; return(model); }
public static SgtQuadsModel Create(SgtQuads quads) { var model = SgtComponentPool <SgtQuadsModel> .Pop(quads.transform, "Quads Model", quads.gameObject.layer); model.Quads = quads; return(model); }
public static SgtCloudsphereModel Create(SgtCloudsphere cloudsphere) { var model = SgtComponentPool<SgtCloudsphereModel>.Pop("Model", cloudsphere.transform); model.Cloudsphere = cloudsphere; return model; }
public static SgtCloudsphereModel Create(SgtCloudsphere cloudsphere) { var model = SgtComponentPool <SgtCloudsphereModel> .Pop(cloudsphere.transform, "Model", cloudsphere.gameObject.layer); model.Cloudsphere = cloudsphere; return(model); }
public static SgtSkysphereModel Create(SgtSkysphere skysphere) { var model = SgtComponentPool <SgtSkysphereModel> .Pop(skysphere.transform, "Model", skysphere.gameObject.layer); model.Skysphere = skysphere; return(model); }
public static SgtStarfieldModel Create(SgtStarfieldGroup group) { var model = SgtComponentPool <SgtStarfieldModel> .Pop("Model", group.transform); model.Group = group; group.Models.Add(model); return(model); }
public static SgtBeltModel Create(SgtBeltGroup group) { var model = SgtComponentPool <SgtBeltModel> .Pop("Model", group.gameObject.layer, group.transform); model.Group = group; group.Models.Add(model); return(model); }
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)); }
private SgtDebris Spawn(SgtDebris prefab) { if (prefab.Pool == true) { targetPrefab = prefab; var debris = SgtComponentPool <SgtDebris> .Pop(DebrisMatch); if (debris != null) { debris.transform.SetParent(transform, false); return(debris); } } return(Instantiate(prefab, transform)); }
public static SgtLightning Create(int layer, Transform parent, float size, float radius, float detail) { if (size > 0.0f && radius > 0.0f && detail > 0.0f) { if (size > 180.0f) { size = 180.0f; } var lightning = SgtComponentPool <SgtLightning> .Pop("Lightning", layer, parent); lightning.Init(size * Mathf.Deg2Rad, radius, detail); return(lightning); } return(null); }
public static SgtPatch Create(string name, int layer, Transform parent) { var patch = SgtComponentPool <SgtPatch> .Pop(name, layer, parent); return(patch); }
public static SgtTerrainLevel Create(string name, int layer, Transform parent) { return(SgtComponentPool <SgtTerrainLevel> .Pop(parent, name, layer)); }