fond et bulle modif pour la campagne
This commit is contained in:
@@ -5,4 +5,22 @@ import java.awt.Graphics;
|
||||
|
||||
public class FondOcean extends ObjetGraphique {
|
||||
|
||||
private int[] positionsBullesX = {100, 250, 400, 550, 700, 150, 450};
|
||||
private int[] positionsBullesY = {600, 800, 700, 900, 650, 1000, 1100};
|
||||
private int vitesseRemonteeDesBulles = 2;
|
||||
|
||||
public FondOcean() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
void Afficher(Graphics pinceau) {
|
||||
pinceau.setColor(new Color(0, 105, 148));
|
||||
pinceau.fillRect(0, 0, 800, 600);
|
||||
|
||||
pinceau.setColor(new Color(255, 255, 255, 150));
|
||||
for (int i = 0; i < positionsBullesX.length; i++) {
|
||||
pinceau.drawOval(positionsBullesX[i], positionsBullesY[i], 10, 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user