コード例 #1
0
 private void SetConsoleSymbolForCell(RLNET.RLConsole console, RogueSharp.Cell cell)
 {
     // if not explored don't draw
     if (!cell.IsExplored)
     {
         return;
     }
     // if cell in FOV draw with lighter colour
     if (IsInFov(cell.X, cell.Y))
     {
         if (cell.IsWalkable)
         {
             console.Set(cell.X, cell.Y, Colours.FloorFov, Colours.FloorBackgroundFov, '.');
         }
         else
         {
             console.Set(cell.X, cell.Y, Colours.WallFov, Colours.WallBackgroundFov, '#');
         }
     }
     else
     {
         if (cell.IsWalkable)
         {
             console.Set(cell.X, cell.Y, Colours.Floor, Colours.FloorBackground, '.');
         }
         else
         {
             console.Set(cell.X, cell.Y, Colours.Wall, Colours.WallBackground, '#');
         }
     }
 }
コード例 #2
0
 public void Draw(RLNET.RLConsole mapConsole)
 {
     mapConsole.Clear();
     foreach (RogueSharp.Cell cell in GetAllCells())
     {
         SetConsoleSymbolForCell(mapConsole, cell);
     }
 }
コード例 #3
0
ファイル: MessageLog.cs プロジェクト: Grufferz/ECS-Test
 public void Draw(RLNET.RLConsole console)
 {
     console.Clear();
     string[] lines = _lines.ToArray();
     for (int i = 0; i < lines.Length; i++)
     {
         console.Print(1, i + 1, lines[i], RLNET.RLColor.White);
     }
 }
コード例 #4
0
 public void DrawStats(RLNET.RLConsole console, int yPosition)
 {
     console.Print(1, yPosition, $"Name:     {Name}", Colors.Text);
     console.Print(1, ++yPosition, $"Health:     {Health}", Colors.Text);
     AddHealthBar(console, 10, yPosition);
     console.Print(1, ++yPosition, $"Attack:     {Attack}", Colors.Text);
     console.Print(1, ++yPosition, $"Defense:     {Defense}", Colors.Text);
     console.Print(1, ++yPosition, $"Gold:     {Gold}", Colors.Text);
 }
コード例 #5
0
        public void DrawStats(RLNET.RLConsole statConsole, int position)
        {
            // Y = 13 is below the player stats
            int yPosition = 13 + (position * 2);

            statConsole.Print(1, yPosition, Symbol.ToString(), Color);

            AddHealthBar(statConsole, 3, yPosition);

            statConsole.Print(2, yPosition, $": {Name}", Palette.DbLight);
        }