Exemple #1
0
  public void startGame() {

    bread.loop();
    gameOn = true;
    yellow.removeFromCanvas();
    pink.removeFromCanvas();
    purple.removeFromCanvas();
    green.removeFromCanvas();
    grey.removeFromCanvas();
    button.removeFromCanvas();
    author.removeFromCanvas();
    title.removeFromCanvas();

    start = new Location(canvas.getWidth() / 2, canvas.getHeight() / 2);
    theFish = new TheFish(fishPic, start, canvas, 50, 25);
    ocean = new Ocean(angryFishPic, angryFishL, bubblePic, canvas, theFish);

    score = new Text("Score: " + currentScore, 0, 0, canvas);
    score.setFontSize(16);
    score.moveTo((canvas.getWidth() - score.getWidth()) / 2, 50);

    bubbles = new Bubbles(dopeBubble, canvas);
  }