Merge branch 'main' of https://titi.koxi.nl/blodat/projet-dev
This commit is contained in:
@@ -40,7 +40,8 @@ public class Bonus extends ObjetGraphique {
|
||||
compteurFrames++;
|
||||
}
|
||||
|
||||
if (compteurFrames >= 300 && !actif) {
|
||||
|
||||
if (compteurFrames >= 220 && !actif) {
|
||||
|
||||
actif = true;
|
||||
dejaCapture = false;
|
||||
@@ -53,9 +54,9 @@ public class Bonus extends ObjetGraphique {
|
||||
}
|
||||
|
||||
if (Math.random() > 0.5) {
|
||||
y = hauteurLigne - 80 - (Math.random() * 50);
|
||||
y = hauteurLigne - 10 - (Math.random() * 50);
|
||||
} else {
|
||||
y = hauteurLigne + 30 + (Math.random() * 20);
|
||||
y = hauteurLigne + 10 + (Math.random() * 50);
|
||||
}
|
||||
|
||||
if (y < 20) y = 20;
|
||||
@@ -65,13 +66,12 @@ public class Bonus extends ObjetGraphique {
|
||||
}
|
||||
|
||||
if (actif) {
|
||||
x -= 10;
|
||||
|
||||
|
||||
double vitesseLigne = monJeu.gestionnaireNiveau.getVitesseScroll();
|
||||
x -= vitesseLigne;
|
||||
|
||||
double centreX = x + (taille / 2.0);
|
||||
|
||||
if (centreX <= monCercle.x && centreX > monCercle.x - 10) {
|
||||
if (centreX <= monCercle.x && centreX > monCercle.x - vitesseLigne) {
|
||||
|
||||
double hautCercle = monCercle.y - monCercle.getRayon();
|
||||
double basCercle = monCercle.y + monCercle.getRayon();
|
||||
@@ -85,6 +85,7 @@ public class Bonus extends ObjetGraphique {
|
||||
}
|
||||
}
|
||||
|
||||
// 2. Quand il sort de l'écran, on le désactive pour relancer le chrono !
|
||||
if (x + taille < 0) {
|
||||
actif = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user