Modification du samedi 13/03/21
This commit is contained in:
parent
105520fec0
commit
c414c8c96c
|
|
@ -1,9 +1,8 @@
|
||||||
//ici il faut faire un enemie qui te fonce dessus
|
//ici il faut faire un enemie qui bouge
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Alien2 {
|
class Alien2 {
|
||||||
|
|
||||||
|
int blob, blob2;
|
||||||
int x,y;
|
int x,y;
|
||||||
int enemypv = 2;
|
int enemypv = 2;
|
||||||
boolean show;
|
boolean show;
|
||||||
|
|
@ -19,6 +18,19 @@ class Alien2 {
|
||||||
enemypv = pv;
|
enemypv = pv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void alea_bouge(){
|
||||||
|
|
||||||
|
random = Math.random()*(0-20)-10;
|
||||||
|
frameRate(500);
|
||||||
|
if (frameCount % 500 == 0) {
|
||||||
|
x = blob;
|
||||||
|
y = blob;
|
||||||
|
println ("blob = "+blob);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void apparaitre() {
|
void apparaitre() {
|
||||||
|
|
||||||
//affiche l'anime de explosion :
|
//affiche l'anime de explosion :
|
||||||
|
|
@ -71,7 +83,7 @@ class Alien2 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public double random(){
|
public double random(){
|
||||||
random = Math.random()*(10-3);
|
random = Math.random()*(10-4);
|
||||||
return random;
|
return random;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -372,7 +372,7 @@ void setup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (moveXp - moveXn == -1) {
|
if (moveXp - moveXn == -1) {
|
||||||
x = x- deplacement;
|
x = x - deplacement;
|
||||||
if (x < 100) x = 100;
|
if (x < 100) x = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue