Exemplo n.º 1
0
        public override void DrawStep()
        {
            Rectangle mapBounds = new Rectangle(Position, new Size(Size));

            GraphicConsole.SetBounds(mapBounds);

            Vector2 origin = Vector2.Zero;

            origin.X += mapOffset.X / GraphicConsole.BufferWidth;
            origin.Y += mapOffset.Y / GraphicConsole.BufferWidth;

            int x = (int)(origin.X + mapBounds.X);
            int y = (int)(origin.Y + mapBounds.Y);

            GraphicConsole.SetColor(axisColor, Color4.Black);
            GraphicConsole.Draw.Line(x, mapBounds.Top + 1, x, mapBounds.Bottom - 1, '·');
            GraphicConsole.Draw.Line(mapBounds.Left + 1, y, mapBounds.Right - 1, y, '·');
            GraphicConsole.SetCursor(x + 1, y - 1);
            GraphicConsole.ClearColor();

            double travelRadius = Interface.GameManager.PlayerShip.JumpRadius;
            int    r            = (int)(travelRadius / GraphicConsole.BufferWidth);

            Point playerPos = getScreenPosFromCoord(getCoordFromWorldPos(Interface.GameManager.PlayerShip.WorldPosition));

            GraphicConsole.SetColor(Color4.Gray, Color4.Black);
            GraphicConsole.Draw.Circle(playerPos.X, playerPos.Y, r, '·');

            if (drawSelectedSystem)
            {
                drawPaths();
            }
            drawShips();
            drawSystems();
            drawFactions();

            GraphicConsole.ClearBounds();
            GraphicConsole.ClearColor();

            drawBorder(mapBounds);

            if (DrawPlayerPosition)
            {
                GraphicConsole.SetColor(Color4.Red, Color4.Black);
                GraphicConsole.Put('@', playerPos);
            }

            GraphicConsole.ClearColor();
            base.DrawStep();
        }