ajout score
ajout score
This commit is contained in:
@@ -47,12 +47,13 @@ public class Jeu implements KeyListener, ActionListener{
|
||||
//-------------------------------------------------------------------------
|
||||
public Jeu(){
|
||||
// Gestion du score : a réactiver en fin de TP, inutile au début
|
||||
/*
|
||||
|
||||
labScore = new JLabel();
|
||||
labScore.setForeground(Color.WHITE);
|
||||
labScore.setText("<html><h3>score : 0</h3></html>");
|
||||
labScore.setBounds(20, 0, 200, 50);
|
||||
ecran.add(labScore);
|
||||
*/
|
||||
|
||||
ecran.traiterBoucleAnimation();
|
||||
}
|
||||
|
||||
@@ -148,7 +149,8 @@ public class Jeu implements KeyListener, ActionListener{
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
ecran.traiterBoucleAnimation();
|
||||
|
||||
score = score + 0.4;
|
||||
labScore.setText("<html><h3>score : " + (int)score + "</h3></html>");
|
||||
if (demiCercleArriere.EnCollision(lili.SegCourant))
|
||||
RecommencerPartie();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user