예제 #1
0
 //Vẽ map từ Map_Info
 private void DrawMap()
 {
     for (int i = 0; i < Map_Const.X; i++)
     {
         for (int j = 0; j < Map_Const.Y; j++)
         {
             if (MapInfo._Matrix[i, j] != Map_Const.Default.ToString())
             {
                 Object = new Map_Object(Img_List.Images[(int.Parse(MapInfo._Matrix[i, j]) - 1)], pn_Map);
                 Object.Draw(new Point(i, j));
             }
         }
     }
 }
예제 #2
0
        //Vẽ map từ Map_Info
        private void DrawMap()
        {
            foreach (string Obj in Map_Info.list_Object)
            {

                try
                {
                    string[] info_Object = Obj.Split(' ');
                    if (Map_Info.list_Object.IndexOf(Obj) > 1)
                    {
                        Object = new Map_Object(Img_List.Images[Int32.Parse(info_Object[0])], pn_Map);
                        Object.Draw(new Point(Int32.Parse(info_Object[1]), Int32.Parse(info_Object[2])));
                    }
                }
                catch
                {
                    MessageBox.Show("ERROR: Draw Map fail");
                }
            }
        }