public VentanaJuego()
        {
            InitializeComponent();
            //this.Width = w;
            //this.Height = h;
            //pictureBox1.Width = w ;
            //pictureBox1.Height = h;
            //----------Manager--------------------//
            F_M = new FileManager();
            R_M = new RenderManager();
            S_M = new SceneManager();
            PM = new PhisicManager();

            //--------Delegados-------------------//
            S_H = new SceneHandler(S_M.PlayScene);
            R_H = new RenderHandler(R_M.AddData);
            F_H = new FileHandler(F_M.GetImg);

            //---------Inicializacion------------//
            R_M.AddHandlers(S_H, F_H);
            //mapa1.SetFileManager(F_H);
            mapa1 = F_M.CargarMapa("../../Mapas/mapa3.xml", this.Width, this.Height, 32);
            mapa1.IM.left = Keys.A;
            mapa1.IM.right = Keys.D;
            mapa1.IM.up = Keys.W;
            mapa1.IM.down = Keys.S;
            mapa1.Draw(R_H);
            R_M.Sorting();
            //--------Timer--------------------//
            //Thread mov = new Thread(Caminar);
            //Thread col = new Thread(Colicion);
            //mov.Start();
            timer1.Start();
            //col.Start();
            mapa1.FraccPantalla(pictureBox1.Width, pictureBox1.Height);
            mapa1.CentrarJugador();
            //----------Sonido------------------//
            //mp = new MP3Player();
            //mp.Open(F_M.GetAud_Path("Correr"));
            //mp.Play();

            pictureBox1.Refresh();
        }
 //, AddElemento ae)
 public MakeMap(FileHandler fh, List<Elemento> herr, CreateMap cm)
 {
     InitializeComponent();
     //
     Matriz = new List<Elemento>();
     temMap = new Map("", 0, 0, (int)width.Value, (int)height.Value, trackBar1.Maximum);
     S_M = new SceneManager();
     R_M = new RenderManager();
     R_M.AddHandlers(new SceneHandler(S_M.PlayScene), fh);
     F_H = fh;
     temMap.SetFileManager(fh);
     CrearMatriz((int)height.Value,(int)width.Value,trackBar1.Value,1);
     temMap.Draw(new RenderHandler(R_M.AddData));
     R_M.Fondo = Color.White;
     temp = new List<Elemento>();
     Herramienta = herr;
     pm = new PhisicManager();
     C_M = cm;
 }