Exemple #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));
    }
Exemple #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);
                    }
                }
            }
        }
    }
Exemple #3
0
 public Mesh GetMesh(int index)
 {
     return(SGT_ArrayHelper.Index(meshes, index));
 }
Exemple #4
0
 public Texture2D GetAtlas(int index = 0)
 {
     return(SGT_ArrayHelper.Index(atlases, index));
 }
Exemple #5
0
 public SGT_PackerOutput GetOutput(int index)
 {
     return(SGT_ArrayHelper.Index(outputs, index));
 }
Exemple #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));
 }
Exemple #8
0
 public int GetRenderQueue(int index)
 {
     return(SGT_ArrayHelper.Index(renderQueues, index));
 }
Exemple #9
0
 public Material GetMaterial(int index)
 {
     return(SGT_ArrayHelper.Index(materials, index));
 }
Exemple #10
0
 public Texture GetTexture(int faceIndex)
 {
     return(SGT_ArrayHelper.Index(textures, faceIndex));
 }
Exemple #11
0
 public SGT_DebrisVariant GetDebrisVariant(int index)
 {
     return(SGT_ArrayHelper.Index(variantList, index));
 }