Files
Projet_DEV/src/linea/FondOcean.java

27 lines
721 B
Java
Raw Normal View History

2026-02-23 10:43:36 +01:00
package linea;
2026-02-23 10:50:31 +01:00
import java.awt.Color;
import java.awt.Graphics;
public class FondOcean extends ObjetGraphique {
2026-02-23 10:43:36 +01:00
2026-02-23 10:51:50 +01:00
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);
}
}
2026-02-23 10:43:36 +01:00
}