Beispiel #1
0
        public static void Draw()
        {
            //Self path draw
            if (DrawMap.ThisCase.State != ARX.State.Void)
            {
                DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DrawMap.PathInside());
            }

            //Externals paths draw
            if (DrawMap.Map.CanGoUp(DrawMap.ThisCase.Coord))
            {
                DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DrawMap.PathUp());
            }
            if (DrawMap.Map.CanGoRight(DrawMap.ThisCase.Coord))
            {
                DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DrawMap.PathRight());
            }
            if (DrawMap.Map.CanGoDown(DrawMap.ThisCase.Coord))
            {
                DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DrawMap.PathDown());
            }
            if (DrawMap.Map.CanGoLeft(DrawMap.ThisCase.Coord))
            {
                DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DrawMap.PathLeft());
            }
        }
Beispiel #2
0
 private void picMap_Paint(object sender, PaintEventArgs e)
 {
     if (map != null)
     {
         if (data.DrawType == 0)
         {
             DrawMap.Draw(e, picMap.Size, map, player, ARX.MapType.Normal);
         }
         else if (data.DrawType == 1)
         {
             DrawMap.Draw(e, picMap.Size, map, player, ARX.MapType.Pacman);
         }
         else if (data.DrawType == 2)
         {
             DrawMap.Draw(e, picMap.Size, map, player, ARX.MapType.Fill);
         }
     }
 }
Beispiel #3
0
        public static void Draw()
        {
            //Create internal angles
            if (!DrawMap.Map.CanGoUp(DrawMap.ThisCase.Coord) && !DrawMap.Map.CanGoRight(DrawMap.ThisCase.Coord))
            {
                DrawMap.PictureElement.Graphics.FillPie(DrawMap.PathBrush, DrawMap.PathInside(), 270, 90);
            }
            else
            {
                DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, InUpRight());
            }
            if (!DrawMap.Map.CanGoRight(DrawMap.ThisCase.Coord) && !DrawMap.Map.CanGoDown(DrawMap.ThisCase.Coord))
            {
                DrawMap.PictureElement.Graphics.FillPie(DrawMap.PathBrush, DrawMap.PathInside(), 0, 90);
            }
            else
            {
                DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, InDownRight());
            }
            if (!DrawMap.Map.CanGoDown(DrawMap.ThisCase.Coord) && !DrawMap.Map.CanGoLeft(DrawMap.ThisCase.Coord))
            {
                DrawMap.PictureElement.Graphics.FillPie(DrawMap.PathBrush, DrawMap.PathInside(), 90, 90);
            }
            else
            {
                DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, InDownLeft());
            }
            if (!DrawMap.Map.CanGoLeft(DrawMap.ThisCase.Coord) && !DrawMap.Map.CanGoUp(DrawMap.ThisCase.Coord))
            {
                DrawMap.PictureElement.Graphics.FillPie(DrawMap.PathBrush, DrawMap.PathInside(), 180, 90);
            }
            else
            {
                DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, InUpLeft());
            }

            //Create path between cases
            if (DrawMap.Map.CanGoUp(DrawMap.ThisCase.Coord))
            {
                DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DrawMap.PathUp());
            }
            if (DrawMap.Map.CanGoRight(DrawMap.ThisCase.Coord))
            {
                DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DrawMap.PathRight());
            }
            if (DrawMap.Map.CanGoDown(DrawMap.ThisCase.Coord))
            {
                DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DrawMap.PathDown());
            }
            if (DrawMap.Map.CanGoLeft(DrawMap.ThisCase.Coord))
            {
                DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DrawMap.PathLeft());
            }

            //Create externals angles
            if (DrawMap.Map.CanGoUp(DrawMap.ThisCase.Coord) && DrawMap.Map.CanGoRight(DrawMap.ThisCase.Coord))
            {
                DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, UpRightArc());
            }
            if (DrawMap.Map.CanGoRight(DrawMap.ThisCase.Coord) && DrawMap.Map.CanGoDown(DrawMap.ThisCase.Coord))
            {
                DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DownRightArc());
            }
            if (DrawMap.Map.CanGoDown(DrawMap.ThisCase.Coord) && DrawMap.Map.CanGoLeft(DrawMap.ThisCase.Coord))
            {
                DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DownLeftArc());
            }
            if (DrawMap.Map.CanGoLeft(DrawMap.ThisCase.Coord) && DrawMap.Map.CanGoUp(DrawMap.ThisCase.Coord))
            {
                DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, UpLeftArc());
            }

            DrawMap.PictureElement.Graphics.FillEllipse(DrawMap.BackBrush, OutsideArc());
        }