Modification du samedi 30/01/21

This commit is contained in:
Stève Oriol 2021-01-30 14:11:41 +01:00
parent 882bb78b4e
commit 34fc13a786
5 changed files with 391 additions and 379 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View File

@ -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;

View File

@ -1 +0,0 @@
//ici il faudrat faire un laser qui one-shoot les enemies basiques

17
mechant_tres_mechant.pde Normal file
View File

@ -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);
}
}

View File

@ -13,9 +13,10 @@ SoundFile sonExposion;
SoundFile sonCollision;
SoundFile sonLaser_boss;
boolean test = false;
int largeur = 1600;
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";
int x = largeur/2;
int y = hauteur-100;
@ -27,7 +28,7 @@ int win;
float time;
boolean lancermisile = false;
String touchePresse = null;
int nombreEnemiRestek = nombreEnemik;
//int nombreEnemiRestek = nombreEnemik;
Ship ship;
@ -70,6 +71,7 @@ void setup() {
imgWin = loadImage("data/images/Win_game.png");
imgboss1 = loadImage("data/images/vaiseau_enemi.png");
laserboss1 = loadImage("data/images/laser_boss1.png");
mechant2 = loadImage("data/mechant_tres_mechant.png");
//on crée le ship
ship = new Ship(x, y, 3, img_ship);
@ -125,8 +127,6 @@ void setup() {
miseAJourDuDeplacement();
float d = random (1, 100);
//Affiche l'image de fond (l'espace)
background(space);
@ -278,7 +278,8 @@ void setup() {
//on tue tous les ennemis
for (int i = 0; i<nombreEnemi; i++) {
a[i].enemypv = 0;
nombreEnemiRestek = 0;
test = true;
// nombreEnemiRestek = 0;
boss_pv = 1;
}