modif du samedi 19 juin 2021

This commit is contained in:
Arthaud Oriol 2021-06-19 13:22:27 +02:00
parent c2e3cb2f83
commit 8c6ba77d48
4 changed files with 80 additions and 81 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

@ -15,20 +15,19 @@ class MisileGuides {
} }
void guide() { void guide() {
if (x < ship.x) { if (x < ship.x) {
x = x + 6; x = x + 8;
if (y < ship.y) {
y = y + 6;
// while(x < ship.x){
// y += 6;
// x += 6;
//}
} }
if (y < ship.y) {
y = y + 8;
}
if (x > ship.x) {
x = x + -8;
}
if (y > ship.y) {
y = y + -8;
} }
} }
void apparaitre() { void apparaitre() {

View File

@ -81,7 +81,7 @@ void setup() {
//création du boss //création du boss
boss = new Boss(5, "vaiseau_enemi.png", 800, 171, 8); boss = new Boss(5, "vaiseau_enemi.png", 800, 171, 8);
//on crée le ship //on crée le ship
ship = new Ship(x, y, 5, img_ship); ship = new Ship(x, y, 9999, img_ship);
//on crée des ennemis //on crée des ennemis
for (int i = 0; i<nombreEnemi; i++) { for (int i = 0; i<nombreEnemi; i++) {