Example #1
0
  @Override
  public boolean drop(String id) {
    Audio audio = idToAudioMap.remove(id);

    if (audio != null) {
      audio.destroy();
      Log.println(LOW_DEBUG, id + " Audio Destroyed Successfully");
      return true;
    }
    return false;
  }
 private void select() {
   switch (currentOption) {
     case 0:
       music.stop();
       gsm.setState(GameStateManager.HARDMODESTATE);
       break;
     case 1:
       gsm.setState(GameStateManager.HELPSTATE);
       break;
     case 2:
       // close
       System.exit(0);
   }
 }
  MenuState(GameStateManager gsm) {
    super(gsm);

    try {
      bg = new Background("/Backgrounds/Menu.gif", 1);
      bg.setVector(-0.1, 0);

      titleColor = Color.WHITE;
      titleFont = new Font("Times New Roman", Font.PLAIN, 28);
      font = new Font("Times New Roman", Font.PLAIN, 12);

      music = new Audio("/Audio/mainTheme.wav");
      music.play();

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
 public void init() {
   music.play();
 }
Example #5
0
 @Override
 public void dropAll() {
   for (Audio audio : idToAudioMap.values()) {
     audio.destroy();
   }
 }