Commit 50c283c0 authored by Rominho15's avatar Rominho15
Browse files

Version 9.4.4 : réglages minimes

parent 221fd297
......@@ -4,7 +4,6 @@ import android.content.Context;
import android.content.Intent;
import android.graphics.Point;
import android.media.MediaPlayer;
import android.util.Log;
import android.view.Display;
import android.view.WindowManager;
......@@ -213,7 +212,7 @@ public class GameController {
vx*=-1;
giveBonus(b.getX()+b.getWidth()/2,b.getY()+b.getHeight()/2);
brickGroup.destroyBrick(b);
gameModel.getEvents().addScore(niveau);
gameModel.getEvents().addScore(difficulty);
if(gameModel.getNbBricks() == 0) {
this.endGame(true);
}
......@@ -230,7 +229,7 @@ public class GameController {
});
gameModel.destroyShoot();
brickGroup.destroyBrick(b);
gameModel.getEvents().addScore(niveau);
gameModel.getEvents().addScore(difficulty);
if(gameModel.getNbBricks() == 0) {
this.endGame(true);
}
......@@ -335,16 +334,11 @@ public class GameController {
public void giveBonus(int x, int y) {
Random r = new Random();
int i = r.nextInt(26);
Log.d("Random", "" + i);
if(i == 0) {
int s = 2;
if(gameModel.getBat2() != null && y < gameModel.getGround().getHeight()/2)
s = -2;
Log.d("height",""+gameModel.getGround().getHeight());
Log.d("y",""+y);
Log.d("s",""+s);
gameModel.createBonus(x,y,s);
}
}
......
......@@ -14,7 +14,7 @@ public class Evenements {
this.score = score;
}
public void addScore(int niveau) {
this.score += 5*(niveau+1);
public void addScore(int difficulte) {
this.score += 5*(difficulte+1);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment