Esempio n. 1
0
    void UpdateSoundsSetsCount()
    {
        string[] texturesNames = GeneralTools.GetArrayOf(terrain.terrainData.splatPrototypes, delegate(SplatPrototype splat) { return(splat.texture.name); });

        List <TerrainControllerSoundsSet> newSet = new List <TerrainControllerSoundsSet>();

        TerrainControllerSoundsSet tempObj;

        for (int x = 0; x < texturesNames.Length; x++)
        {
            tempObj = new TerrainControllerSoundsSet(texturesNames[x]);

            for (int y = 0; y < soundsSets.Count; y++)
            {
                if (soundsSets[y].TextureName == texturesNames[x])
                {
                    tempObj.SoundsSet = soundsSets[y].SoundsSet;
                    break;
                }
            }

            newSet.Add(tempObj);
        }

        soundsSets = newSet;
    }