Example #1
0
    public SGT_StarfieldStarVariant GetStarVariant(int index)
    {
        if (packer != null)
        {
            SGT_ArrayHelper.Resize(ref starVariants, packer.OutputCount, true);
        }

        return(SGT_ArrayHelper.Index(starVariants, index));
    }
Example #2
0
    public void ReplaceAll(Mesh[] newSharedMeshes, Material[] newSharedMaterials = null, PhysicMaterial[] newSharedPhysicsMaterials = null)
    {
        if (newSharedMeshes != null)
        {
            Resize(newSharedMeshes.Length);

            sharedMesh = null;
            if (newSharedMaterials != null)
            {
                sharedMaterial = null;
            }
            if (newSharedPhysicsMaterials != null)
            {
                sharedPhysicsMaterial = null;
            }

            // Set all meshes
            for (var i = 0; i < newSharedMeshes.Length; i++)
            {
                var mesh = meshes[i];

                if (mesh != null)
                {
                    mesh.SharedMesh = newSharedMeshes[i];
                    if (newSharedMaterials != null)
                    {
                        mesh.SharedMaterial = SGT_ArrayHelper.Index(newSharedMaterials, i);
                    }
                    if (newSharedPhysicsMaterials != null)
                    {
                        mesh.SharedPhysicsMaterial = SGT_ArrayHelper.Index(newSharedPhysicsMaterials, i);
                    }
                }
            }
        }
    }
Example #3
0
 public Mesh GetMesh(int index)
 {
     return(SGT_ArrayHelper.Index(meshes, index));
 }
Example #4
0
 public Texture2D GetAtlas(int index = 0)
 {
     return(SGT_ArrayHelper.Index(atlases, index));
 }
Example #5
0
 public SGT_PackerOutput GetOutput(int index)
 {
     return(SGT_ArrayHelper.Index(outputs, index));
 }
Example #6
0
 public SGT_PackerInput GetInput(int index)
 {
     return(SGT_ArrayHelper.Index(inputs, index));
 }
 public SGT_Thruster GetThruster(int index)
 {
     return(SGT_ArrayHelper.Index(thrusters, index));
 }
Example #8
0
 public int GetRenderQueue(int index)
 {
     return(SGT_ArrayHelper.Index(renderQueues, index));
 }
Example #9
0
 public Material GetMaterial(int index)
 {
     return(SGT_ArrayHelper.Index(materials, index));
 }
Example #10
0
 public Texture GetTexture(int faceIndex)
 {
     return(SGT_ArrayHelper.Index(textures, faceIndex));
 }
Example #11
0
 public SGT_DebrisVariant GetDebrisVariant(int index)
 {
     return(SGT_ArrayHelper.Index(variantList, index));
 }