diff --git a/misille_guides.pde b/misille_guides.pde index ac50858..70f1c49 100644 --- a/misille_guides.pde +++ b/misille_guides.pde @@ -9,14 +9,14 @@ class MisileGuides { MisileGuides(int xt,int yt,String misilet,float timet) { x = xt; - y = yStart = yt; + y = yt; time = timet; misile = loadImage(misilet); } - void guide(int xv, int yv) { - if (x < xv) { - while(x < xv){ + void guide() { + if (x < ship.x) { + while(x < ship.x){ y -= 6; x += 6; } diff --git a/space_inviders.pde b/space_inviders.pde index d42dfc1..33050b8 100644 --- a/space_inviders.pde +++ b/space_inviders.pde @@ -13,6 +13,7 @@ SoundFile sonExposion; SoundFile sonCollision; SoundFile sonLaser_boss; +boolean d = true; boolean test = false; int largeur = 1600; int hauteur = 900; @@ -63,7 +64,7 @@ void setup() { c[0] = new Alien2(800,350,5,"mechant_tres_mechant150x150.png"); c[1] = new Alien2(1200,350,5,"mechant_tres_mechant150x150.png"); c[2] = new Alien2(400,350,5,"mechant_tres_mechant150x150.png"); - + //là, ça charge les images dans leurres varibles space = loadImage("data/images/space.jpg"); @@ -77,7 +78,7 @@ void setup() { //création du boss boss = new Boss(5, "vaiseau_enemi.png", 800, 171, 8); //on crée le ship - ship = new Ship(x, y, 3, img_ship); + ship = new Ship(x, y, 999999, img_ship); //on crée des ennemis for (int i = 0; i