コード例 #1
0
ファイル: Header.cs プロジェクト: gabcinder2004/GladiatorRPG
        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
ファイル: Zone1.cs プロジェクト: gabcinder2004/GladiatorRPG
 private Zone1()
 {
     StateChanged += OnStateChanged;
     Map = new ZoneMap(10, 10);
     PopulateMap();
 }