示例#1
0
        private static void DrawPlaza(this Graphics gfx, TerrainLayer g, ushort px, ushort py, int scale)
        {
            g.GetBuildingCoordinate(px, py, scale, out var x, out var y);

            var width  = scale * PlazaWidth;
            var height = scale * PlazaHeight;

            gfx.FillRectangle(Plaza, x, y, width, height);
        }
示例#2
0
        private static void DrawBuildings(this Graphics gfx, TerrainLayer g, IReadOnlyList <Building> buildings, Font?f, int scale, int index = -1)
        {
            for (int i = 0; i < buildings.Count; i++)
            {
                var b = buildings[i];
                if (b.BuildingType == 0)
                {
                    continue;
                }
                g.GetBuildingCoordinate(b.X, b.Y, scale, out var x, out var y);

                var pen = index == i ? Selected : Others;
                DrawBuilding(gfx, f, scale, pen, x, y, b, Text);
            }
        }