Modification du samedi 30/01/21
This commit is contained in:
parent
882bb78b4e
commit
34fc13a786
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
|
|
@ -1,5 +0,0 @@
|
||||||
//ici il faut faire un enemie qui te fonce dessus
|
|
||||||
int pv_tres_mechant = 2;
|
|
||||||
float cooldown_fonce = random(3,10);
|
|
||||||
int yk;
|
|
||||||
int xk;
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
//ici il faudrat faire un laser qui one-shoot les enemies basiques
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
//ici il faut faire un enemie qui te fonce dessus
|
||||||
|
int p = 2;
|
||||||
|
double random;
|
||||||
|
public double random(){
|
||||||
|
random = Math.random()*(10-3);
|
||||||
|
return random;
|
||||||
|
}
|
||||||
|
|
||||||
|
double cooldown_fonce = random();
|
||||||
|
|
||||||
|
//le if doit etre dans une fonction ou une class ou void ...
|
||||||
|
|
||||||
|
void test () {
|
||||||
|
if (test == true){
|
||||||
|
image(mechant2, largeur/2, hauteur/2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -13,9 +13,10 @@ SoundFile sonExposion;
|
||||||
SoundFile sonCollision;
|
SoundFile sonCollision;
|
||||||
SoundFile sonLaser_boss;
|
SoundFile sonLaser_boss;
|
||||||
|
|
||||||
|
boolean test = false;
|
||||||
int largeur = 1600;
|
int largeur = 1600;
|
||||||
int hauteur = 900;
|
int hauteur = 900;
|
||||||
PImage space, img_ship, misile, mechant, imgGameover, imgWin, imgboss1, laserboss1;
|
PImage space, img_ship, misile, mechant, imgGameover, imgWin, imgboss1, laserboss1, mechant2;
|
||||||
String misileMechant1 = "data/images/misile - mechant.png";
|
String misileMechant1 = "data/images/misile - mechant.png";
|
||||||
int x = largeur/2;
|
int x = largeur/2;
|
||||||
int y = hauteur-100;
|
int y = hauteur-100;
|
||||||
|
|
@ -27,7 +28,7 @@ int win;
|
||||||
float time;
|
float time;
|
||||||
boolean lancermisile = false;
|
boolean lancermisile = false;
|
||||||
String touchePresse = null;
|
String touchePresse = null;
|
||||||
int nombreEnemiRestek = nombreEnemik;
|
//int nombreEnemiRestek = nombreEnemik;
|
||||||
|
|
||||||
Ship ship;
|
Ship ship;
|
||||||
|
|
||||||
|
|
@ -70,6 +71,7 @@ void setup() {
|
||||||
imgWin = loadImage("data/images/Win_game.png");
|
imgWin = loadImage("data/images/Win_game.png");
|
||||||
imgboss1 = loadImage("data/images/vaiseau_enemi.png");
|
imgboss1 = loadImage("data/images/vaiseau_enemi.png");
|
||||||
laserboss1 = loadImage("data/images/laser_boss1.png");
|
laserboss1 = loadImage("data/images/laser_boss1.png");
|
||||||
|
mechant2 = loadImage("data/mechant_tres_mechant.png");
|
||||||
//on crée le ship
|
//on crée le ship
|
||||||
ship = new Ship(x, y, 3, img_ship);
|
ship = new Ship(x, y, 3, img_ship);
|
||||||
|
|
||||||
|
|
@ -125,8 +127,6 @@ void setup() {
|
||||||
|
|
||||||
miseAJourDuDeplacement();
|
miseAJourDuDeplacement();
|
||||||
|
|
||||||
float d = random (1, 100);
|
|
||||||
|
|
||||||
//Affiche l'image de fond (l'espace)
|
//Affiche l'image de fond (l'espace)
|
||||||
background(space);
|
background(space);
|
||||||
|
|
||||||
|
|
@ -278,7 +278,8 @@ void setup() {
|
||||||
//on tue tous les ennemis
|
//on tue tous les ennemis
|
||||||
for (int i = 0; i<nombreEnemi; i++) {
|
for (int i = 0; i<nombreEnemi; i++) {
|
||||||
a[i].enemypv = 0;
|
a[i].enemypv = 0;
|
||||||
nombreEnemiRestek = 0;
|
test = true;
|
||||||
|
// nombreEnemiRestek = 0;
|
||||||
boss_pv = 1;
|
boss_pv = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue