コード例 #1
0
 // ------------------------------------------------------------------------------------------------------------------------------------
 // Buttons clicked
 public void pauseClicked() {
   // Pauses game
   // Checks if pause button is clicked
   if (pauseB.clicked(mx, my, true) && pause == false) {
     clickedSound();
     pause = true;
   }
 }
コード例 #2
0
  public void musicClicked() {
    // Mutes/unmutes music
    // checks to see if mute/unmute button is clicked
    if (muteB.clicked(mx, my, true) && pause == true && musicOn == true) {
      clickedSound();
      musicOn = false;
      clicked.stop();
      bckGrndMusic.stop();
      coinSound.stop();
      starSound.stop();
      bounce.stop();

    } else if (unmuteB.clicked(mx, my, true) && pause == true && musicOn == false) {
      clickedSound();
      musicOn = true;
      bckGrndMusic.loop();
    }
  }
コード例 #3
0
 public void resumeClicked() {
   // Resumes game
   // Checks if resume button is clicked
   if (resumeB.clicked(mx, my, true) && pause == true && die == false) {
     clickedSound();
     pause = false;
     lvlClear = false;
   }
 }
コード例 #4
0
 public void menuClicked() {
   // Returns to back menu
   // Checks to see if back button has been clicked
   if (menuB.clicked(mx, my, true) && pause == true) {
     clickedSound();
     screen = "menu";
     pause = false;
     die = false;
   }
 }