示例#1
0
        public static void BuildMap(ZoneMap map)
        {
            for (int x = 0; x < map.MapWidth; x++)
            {
                var result = string.Empty;

                for (int y = 0; y < map.MapHeight; y++)
                {
                    var tile = map.GetTile(x, y);
                    if (tile == null)
                    {
                        result += "[ ]";
                    }
                    else
                    {
                        if (tile.OccupyingUnit == Player.Instance.CurrentGladiator)
                        {
                            //change color here somehow
                            result += "[*]";
                        }
                        else
                        {
                            result += $"[{tile.OccupyingUnit.Name[0]}]";
                        }
                    }
                }

                Text.WriteLine(ConsoleSide.Left, x, result);
            }
        }
示例#2
0
 private Zone1()
 {
     StateChanged += OnStateChanged;
     Map           = new ZoneMap(10, 10);
     PopulateMap();
 }
示例#3
0
 private Zone1()
 {
     StateChanged += OnStateChanged;
     Map = new ZoneMap(10, 10);
     PopulateMap();
 }