animer bulle

This commit is contained in:
2026-02-23 10:52:31 +01:00
parent 7f63cdf089
commit 26850ca823

View File

@@ -23,4 +23,14 @@ public class FondOcean extends ObjetGraphique {
pinceau.drawOval(positionsBullesX[i], positionsBullesY[i], 10, 10); pinceau.drawOval(positionsBullesX[i], positionsBullesY[i], 10, 10);
} }
} }
@Override
void Animer() {
for (int i = 0; i < positionsBullesY.length; i++) {
positionsBullesY[i] = positionsBullesY[i] - vitesseRemonteeDesBulles;
if (positionsBullesY[i] < -20) {
positionsBullesY[i] = 650;
}
}
}
} }