Exemple #1
0
        void RenderColoursInfo(TerrainMap map)
        {
            Renderer2D renderer = map.Renderer2d;

            int       yOffset      = 80;
            const int textXOffset  = 20;
            const int colourOffset = 4;
            const int colourSize   = 16;

            FastColour[] terrainColours = TerrainHelper.AokTerrainColours;
            string[]     terrainNames   = TerrainHelper.AokTerrainNames;
            for (int i = 0; i < terrainColours.Length; i++)
            {
                renderer.MakeTextTexture(terrainNames[i], 12, textXOffset, yOffset);
                renderer.MakeColourTexture(terrainColours[i], colourOffset,
                                           yOffset + colourOffset, colourSize, colourSize);
                yOffset += 20;
            }
        }