Commit 5b3da5ec authored by Rominho15's avatar Rominho15
Browse files

Version 8.1 : Modification pour le multijoueur

parent 4bd6ccf8
......@@ -73,6 +73,9 @@ public class GameController {
gameModel.getBat2().setY(bat2Y);
gameModel.getBat2().setWidth((int) (size.x / 10));
gameModel.getBat2().setHeight((int) (size.y / 60));
gameModel.getBall().setX(gameModel.getGround().getCenter().x);
gameModel.getBall().setY(gameModel.getBat().getY() - gameModel.getBall().getRayon());
}
if(niveau == 1) {
......@@ -268,7 +271,6 @@ public class GameController {
int gap = bt.getWidth()/3;
int vitesse = ba.getVx();
Log.d("vitesse", "" + vitesse);
if(positionBallByBat < gap ) {
res = -1;
......
......@@ -177,7 +177,7 @@ public class GameView extends View {
int yBat = gameControlleur.getGameModel().getBat().getY();
int wBat = gameControlleur.getGameModel().getBat().getWidth();
int hBat = gameControlleur.getGameModel().getBat().getHeight();
canvas.drawRect(xBat, yBat, xBat + wBat, yBat + hBat, paintBat);
canvas.drawRoundRect(xBat, yBat, xBat + wBat, yBat + hBat, 7, 7, paintBat);
// Curseur
canvas.drawCircle(xBat + wBat / 2, yBat + hBat + 20, 7, paintBall);
......@@ -188,7 +188,7 @@ public class GameView extends View {
int wBat2 = gameControlleur.getGameModel().getBat2().getWidth();
int hBat2 = gameControlleur.getGameModel().getBat2().getHeight();
canvas.drawRect(xBat2, yBat2, xBat2 + wBat2, yBat2 + hBat2, paintBat2);
canvas.drawRoundRect(xBat2, yBat2, xBat2 + wBat2, yBat2 + hBat2, 7, 7, paintBat2);
// Curseur
canvas.drawCircle(xBat2 + wBat2 / 2, yBat2 - 20, 7, paintBall);
......
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