commentaires
This commit is contained in:
@@ -14,18 +14,19 @@ public class Bonus extends ObjetCollectible {
|
||||
|
||||
@Override protected int getSeuilActivation() { return 220; }
|
||||
|
||||
@Override protected Color getCouleurCapture() { return Color.BLUE; }
|
||||
@Override protected Color getCouleurCapture() { return Color.BLUE; } // couleur après avoir été ramasssé
|
||||
|
||||
@Override
|
||||
protected double calculerY(double hauteurLigne) {
|
||||
if (Math.random() > 0.5) return hauteurLigne - 10 - (Math.random() * 50);
|
||||
if (Math.random() > 0.5) return hauteurLigne - 10 - (Math.random() * 50); // position du bonus
|
||||
else return hauteurLigne + 10 + (Math.random() * 50);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void appliquerEffet(Joueur joueur) {
|
||||
if (!monJeu.cheatMode) joueur.ajouterVie();
|
||||
}
|
||||
} // En cheat mode, le bonus ne sert à rien (on a déjà l'invincibilité)
|
||||
|
||||
|
||||
@Override
|
||||
protected void dessiner(Graphics g) {
|
||||
|
||||
Reference in New Issue
Block a user