public BreakingGame(){
           
                direccion=0;
                vidas=5;
                bolaPerdida=0;
                pausa=false;
                movimiento=false;
                inicio=false;
                gameOver=false;
                nombreArchivo="Juego.txt";
                posXPelota=50;
                posYPelota=450;
                score=0;
                pelotaX=0;
                pelotaY=4;
 
                sonido=true;
                movido=false;
                bloques=new LinkedList();
               
                fondo1 = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("images/desierto.jpg"));
                fondo2 = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("images/PH.jpg"));
                fondo3 = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("images/VP.jpg"));
                fondo4 =  Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("images/heisenberg.jpg"));
                fondoGO = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("images/intro.png"));
               
                Image fb1 = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("images/fb1.gif"));
                Image fb2 = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("images/fb2.gif"));
                Image fb3 = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("images/fb3.gif"));
                Image fb4 = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("images/fb4.gif"));
           
                animFB= new Animacion();
                animFB.sumaCuadro(fb1,100);
                animFB.sumaCuadro(fb2,100);
                animFB.sumaCuadro(fb3,100);
                animFB.sumaCuadro(fb4,100);
               
                //pelota= new Pelota(0,0,animFB);
                //pelota.setPosX(policia.getPosX() + policia.getAncho() / 2 - pelota.getAncho() / 2);
                //pelota.setPosY(policia.getPosY() - pelota.getAlto());
 
               
                Image bm1 = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("images/bm1.gif"));
                Image bm2 = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("images/bm2.gif"));
                Image bm3 = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("images/bm3.gif"));
                Image bm4 = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("images/bm4.gif"));
               
                animBM= new Animacion();
                animBM.sumaCuadro(bm1,100);
                animBM.sumaCuadro(bm2,100);
                animBM.sumaCuadro(bm3,100);
                animBM.sumaCuadro(bm4,100);
               
                Image Barra1 = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("images/barra.png"));
               
                animBarra=new Animacion();
                animBarra.sumaCuadro(Barra1,100);
                policia=new Barra(0,0,animBarra);
                policia.setPosX(this.getWidth() / 2 - policia.getAncho() / 2);
                policia.setPosY((this.getHeight() - policia.getAlto()) - 8);
               
                pelota= new Pelota(0,0,animFB);
                pelota.setPosX(policia.getPosX() + policia.getAncho() / 2 - pelota.getAncho() / 2);
                pelota.setPosY(policia.getPosY() - pelota.getAlto());
               
                //beep = new SoundClip("sonidos/beep.wav");
                //explosion = new SoundClip("sonidos/explosion.wav");
                Image Bloques1 = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("images/RV.png"));
                Image Bloques2 = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("images/PHlogo.png"));
                Image Bloques3 = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("images/VPlogo.png"));
                Image Bloques4 = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("images/heisenberg.png"));
                Image Bloques5 = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("images/jesse.png"));
                animBloque1= new Animacion();
                animBloque1.sumaCuadro(Bloques1,100);
                animBloque2=new Animacion();
                animBloque2.sumaCuadro(Bloques2,100);
                animBloque3=new Animacion();
                animBloque3.sumaCuadro(Bloques3,100);
                animBloque4=new Animacion();
                animBloque4.sumaCuadro(Bloques4,100);
                animBloque5=new Animacion();
                animBloque5.sumaCuadro(Bloques5,100);
                for (int i = 50; i < 350; i += 59){
                    for (int j = 15; j < 1130; j += 150){
                        if(i==50){
                            bloques.add(new Ladrillo(j, i, animBloque4));
                            bloques.add(new Ladrillo(j+50, i, animBloque5));
                            bloques.add(new Ladrillo(j+100, i, animBloque4));
                        }else if(i==168){
                            bloques.add(new Ladrillo(j, i, animBM));
                            bloques.add(new Ladrillo(j+40, i, animBM));
                            bloques.add(new Ladrillo(j+80, i, animBM));
                        }else if(i==227){
                            bloques.add(new Ladrillo(j, i, animBloque3));
                        }else if (i==286){
                            bloques.add(new Ladrillo(j, i, animBloque2));
                        }else if (i==345){
                            bloques.add(new Ladrillo(j, i, animBloque1));
                        }
                    }
                }
           
                setBackground(Color.white);
                setSize(1200,600);
                addKeyListener(this);
                cancion = new SoundClip("sounds/heisenberg.wav");
                cancion.setLooping(true);
                cancion.play();
               
           
                Thread th = new Thread (this);
                // Empieza el hilo
                th.start ();
        }