public static SgtSingularity Create(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
            var gameObject  = SgtHelper.CreateGameObject("Singularity", layer, parent, localPosition, localRotation, localScale);
            var singularity = gameObject.AddComponent <SgtSingularity>();

            return(singularity);
        }
예제 #2
0
        public static SgtCorona Create(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
            var gameObject = SgtHelper.CreateGameObject("Corona", layer, parent, localPosition, localRotation, localScale);
            var corona     = gameObject.AddComponent <SgtCorona>();

            return(corona);
        }
예제 #3
0
        public static SgtStarfieldBox Create(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
            var gameObject   = SgtHelper.CreateGameObject("Starfield Box", layer, parent, localPosition, localRotation, localScale);
            var starfieldBox = gameObject.AddComponent <SgtStarfieldBox>();

            return(starfieldBox);
        }
예제 #4
0
        public static SgtAtmosphere Create(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
            var gameObject = SgtHelper.CreateGameObject("Atmosphere", layer, parent, localPosition, localRotation, localScale);
            var atmosphere = gameObject.AddComponent <SgtAtmosphere>();

            return(atmosphere);
        }
예제 #5
0
        public static SgtBeltSimple Create(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
            var gameObject = SgtHelper.CreateGameObject("Belt Simple", layer, parent, localPosition, localRotation, localScale);
            var simpleBelt = gameObject.AddComponent <SgtBeltSimple>();

            return(simpleBelt);
        }
예제 #6
0
        public static SgtAccretion Create(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
            var gameObject = SgtHelper.CreateGameObject("Accretion", layer, parent, localPosition, localRotation, localScale);
            var accretion  = gameObject.AddComponent <SgtAccretion>();

            return(accretion);
        }
        public static SgtLightningSpawner Create(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
            var gameObject       = SgtHelper.CreateGameObject("Lightning Spawner", layer, parent, localPosition, localRotation, localScale);
            var lightningSpawner = gameObject.AddComponent <SgtLightningSpawner>();

            return(lightningSpawner);
        }
예제 #8
0
        public static SgtBeltCustom Create(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
            var gameObject = SgtHelper.CreateGameObject("Belt Custom", layer, parent, localPosition, localRotation, localScale);
            var beltCustom = gameObject.AddComponent <SgtBeltCustom>();

            return(beltCustom);
        }
예제 #9
0
        public static SgtRing Create(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
            var gameObject = SgtHelper.CreateGameObject("Ring", layer, parent, localPosition, localRotation, localScale);
            var ring       = gameObject.AddComponent <SgtRing>();

            return(ring);
        }
예제 #10
0
        public static SgtSpacetime Create(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
            var gameObject = SgtHelper.CreateGameObject("Spacetime", layer, parent, localPosition, localRotation, localScale);
            var spacetime  = gameObject.AddComponent <SgtSpacetime>();

            return(spacetime);
        }
예제 #11
0
        public static SgtLens Create(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
            var gameObject = SgtHelper.CreateGameObject("Lens", layer, parent, localPosition, localRotation, localScale);
            var lens       = gameObject.AddComponent <SgtLens>();

            return(lens);
        }
예제 #12
0
파일: SgtBackdrop.cs 프로젝트: dqchess/twin
        public static SgtBackdrop Create(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
            var gameObject = SgtHelper.CreateGameObject("Backdrop", layer, parent, localPosition, localRotation, localScale);
            var backdrop   = gameObject.AddComponent <SgtBackdrop>();

            return(backdrop);
        }
예제 #13
0
        public static SgtDepthRaycast Create(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
            var gameObject   = SgtHelper.CreateGameObject("Depth Raycast", layer, parent, localPosition, localRotation, localScale);
            var depthRaycast = gameObject.AddComponent <SgtDepthRaycast>();

            return(depthRaycast);
        }
예제 #14
0
        public static SgtShapeGroup Create(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
            var gameObject = SgtHelper.CreateGameObject("Shape Group", layer, parent, localPosition, localRotation, localScale);
            var shapeGroup = gameObject.AddComponent <SgtShapeGroup>();

            return(shapeGroup);
        }
예제 #15
0
        public static SgtProminence Create(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
            var gameObject = SgtHelper.CreateGameObject("Prominence", layer, parent, localPosition, localRotation, localScale);
            var prominence = gameObject.AddComponent <SgtProminence>();

            return(prominence);
        }
예제 #16
0
        public static SgtDebrisGrid Create(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
            var gameObject = SgtHelper.CreateGameObject("Debris Grid", layer, parent, localPosition, localRotation, localScale);
            var debrisGrid = gameObject.AddComponent <SgtDebrisGrid>();

            return(debrisGrid);
        }
예제 #17
0
        public static SgtTerrainPlanet Create(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
            var gameObject = SgtHelper.CreateGameObject("Terrain Planet", layer, parent, localPosition, localRotation, localScale);
            var instance   = gameObject.AddComponent <SgtTerrainPlanet>();

            gameObject.AddComponent <SgtTerrainPlanetMaterial>();

            return(instance);
        }
예제 #18
0
        public SgtStarfieldCustom MakeEditableCopy(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
#if UNITY_EDITOR
            SgtHelper.BeginUndo("Create Editable Starfield Copy");
#endif
            var gameObject      = SgtHelper.CreateGameObject("Editable Starfield Copy", layer, parent, localPosition, localRotation, localScale);
            var customStarfield = SgtHelper.AddComponent <SgtStarfieldCustom>(gameObject, false);
            var quads           = new List <SgtStarfieldStar>();
            var starCount       = BeginQuads();

            for (var i = 0; i < starCount; i++)
            {
                var quad = SgtPoolClass <SgtStarfieldStar> .Pop() ?? new SgtStarfieldStar();

                NextQuad(ref quad, i);

                quads.Add(quad);
            }

            EndQuads();

            // Copy common settings
            customStarfield.Color         = Color;
            customStarfield.Brightness    = Brightness;
            customStarfield.MainTex       = MainTex;
            customStarfield.Layout        = Layout;
            customStarfield.LayoutColumns = LayoutColumns;
            customStarfield.LayoutRows    = LayoutRows;
            customStarfield.LayoutRects   = new List <Rect>(LayoutRects);
            customStarfield.BlendMode     = BlendMode;
            customStarfield.RenderQueue   = RenderQueue;
            customStarfield.PowerRgb      = PowerRgb;
            customStarfield.ClampSize     = ClampSize;
            customStarfield.ClampSizeMin  = ClampSizeMin;
            customStarfield.Stretch       = Stretch;
            customStarfield.StretchVector = StretchVector;
            customStarfield.StretchScale  = StretchScale;
            customStarfield.StretchLimit  = StretchLimit;
            customStarfield.Near          = Near;
            customStarfield.NearTex       = NearTex;
            customStarfield.NearThickness = NearThickness;
            customStarfield.Pulse         = Pulse;
            customStarfield.PulseOffset   = PulseOffset;
            customStarfield.PulseSpeed    = PulseSpeed;

            // Copy custom settings
            customStarfield.Stars = quads;

            // Update
            customStarfield.UpdateMaterial();
            customStarfield.UpdateMeshesAndModels();

            return(customStarfield);
        }
예제 #19
0
        public SgtStarfieldCustom MakeEditableCopy(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
#if UNITY_EDITOR
            SgtHelper.BeginUndo("Create Editable Starfield Copy");
#endif
            var gameObject      = SgtHelper.CreateGameObject("Editable Starfield Copy", layer, parent, localPosition, localRotation, localScale);
            var customStarfield = SgtHelper.AddComponent <SgtStarfieldCustom>(gameObject, false);
            var stars           = customStarfield.Stars;
            var starCount       = BeginQuads();

            for (var i = 0; i < starCount; i++)
            {
                var star = SgtPoolClass <SgtStarfieldStar> .Pop() ?? new SgtStarfieldStar();

                NextQuad(ref star, i);

                stars.Add(star);
            }

            EndQuads();

            // Copy common settings
            customStarfield.Color         = color;
            customStarfield.Brightness    = brightness;
            customStarfield.MainTex       = mainTex;
            customStarfield.Layout        = layout;
            customStarfield.LayoutColumns = layoutColumns;
            customStarfield.LayoutRows    = layoutRows;
            customStarfield.layoutRects   = new List <Rect>(layoutRects);
            customStarfield.blendMode     = blendMode;
            customStarfield.renderQueue   = renderQueue;
            customStarfield.powerRgb      = powerRgb;
            customStarfield.clampSize     = clampSize;
            customStarfield.clampSizeMin  = clampSizeMin;
            customStarfield.stretch       = stretch;
            customStarfield.stretchVector = stretchVector;
            customStarfield.stretchScale  = stretchScale;
            customStarfield.stretchLimit  = stretchLimit;
            customStarfield.near          = near;
            customStarfield.nearTex       = nearTex;
            customStarfield.nearThickness = nearThickness;
            customStarfield.pulse         = pulse;
            customStarfield.pulseOffset   = pulseOffset;
            customStarfield.pulseSpeed    = pulseSpeed;

            return(customStarfield);
        }
예제 #20
0
        public SgtBeltCustom MakeEditableCopy(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
#if UNITY_EDITOR
            SgtHelper.BeginUndo("Create Editable Belt Copy");
#endif
            var gameObject = SgtHelper.CreateGameObject("Editable Belt Copy", layer, parent, localPosition, localRotation, localScale);
            var customBelt = SgtHelper.AddComponent <SgtBeltCustom>(gameObject, false);
            var quads      = new List <SgtBeltAsteroid>();
            var quadCount  = BeginQuads();

            for (var i = 0; i < quadCount; i++)
            {
                var asteroid = SgtPoolClass <SgtBeltAsteroid> .Pop() ?? new SgtBeltAsteroid();

                NextQuad(ref asteroid, i);

                quads.Add(asteroid);
            }

            EndQuads();

            // Copy common settings
            customBelt.Color         = Color;
            customBelt.Brightness    = Brightness;
            customBelt.MainTex       = MainTex;
            customBelt.Layout        = Layout;
            customBelt.LayoutColumns = LayoutColumns;
            customBelt.LayoutRows    = LayoutRows;
            customBelt.LayoutRects   = new List <Rect>(LayoutRects);
            customBelt.BlendMode     = BlendMode;
            customBelt.RenderQueue   = RenderQueue;
            customBelt.OrbitOffset   = OrbitOffset;
            customBelt.OrbitSpeed    = OrbitSpeed;
            customBelt.Lit           = Lit;
            customBelt.LightingTex   = LightingTex;
            customBelt.AmbientColor  = AmbientColor;
            customBelt.PowerRgb      = PowerRgb;

            // Copy custom settings
            customBelt.Asteroids = quads;

            // Update
            customBelt.UpdateMaterial();
            customBelt.UpdateMeshesAndModels();

            return(customBelt);
        }
예제 #21
0
        public SgtBeltCustom MakeEditableCopy(int layer, Transform parent, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
        {
#if UNITY_EDITOR
            SgtHelper.BeginUndo("Create Editable Belt Copy");
#endif
            var gameObject = SgtHelper.CreateGameObject("Editable Belt Copy", layer, parent, localPosition, localRotation, localScale);
            var customBelt = SgtHelper.AddComponent <SgtBeltCustom>(gameObject, false);
            var asteroids  = customBelt.Asteroids;
            var quadCount  = BeginQuads();

            for (var i = 0; i < quadCount; i++)
            {
                var asteroid = SgtPoolClass <SgtBeltAsteroid> .Pop() ?? new SgtBeltAsteroid();

                NextQuad(ref asteroid, i);

                asteroids.Add(asteroid);
            }

            EndQuads();

            // Copy common settings
            customBelt.Color         = Color;
            customBelt.Brightness    = Brightness;
            customBelt.mainTex       = mainTex;
            customBelt.layout        = layout;
            customBelt.layoutColumns = layoutColumns;
            customBelt.layoutRows    = layoutRows;
            customBelt.layoutRects   = new List <Rect>(layoutRects);
            customBelt.blendMode     = blendMode;
            customBelt.renderQueue   = renderQueue;
            customBelt.orbitOffset   = orbitOffset;
            customBelt.orbitSpeed    = orbitSpeed;
            customBelt.lit           = lit;
            customBelt.lightingTex   = lightingTex;
            customBelt.ambientColor  = ambientColor;
            customBelt.powerRgb      = powerRgb;

            return(customBelt);
        }