changement sur le mode de triche
This commit is contained in:
@@ -245,6 +245,13 @@ public class Jeu implements KeyListener, ActionListener{
|
||||
this.ecran.repaint(); // 3. Forcer l'affichage du texte
|
||||
|
||||
GestionBDD.ajouterScore((int)this.score);// enregistrement du score dans la base de donne
|
||||
} else if (this.modeTriche && this.laLigne.getSegCourant() != null) {
|
||||
// En mode triche, forcer le cercle à rester sur la ligne
|
||||
double yPoint = this.laLigne.SegCourant.y + (this.laLigne.SegCourant.yLong / this.laLigne.SegCourant.xLong) * (this.demiCercleAvant.x - this.laLigne.SegCourant.x);
|
||||
this.demiCercleAvant.y = yPoint;
|
||||
this.demiCercleArriere.y = yPoint;
|
||||
this.demiCercleAvant.resetVitesse();
|
||||
this.demiCercleArriere.resetVitesse();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user