예제 #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;
  }
예제 #2
0
 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);
   }
 }
예제 #3
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();
    }
  }
예제 #4
0
 public void init() {
   music.play();
 }
예제 #5
0
 @Override
 public void dropAll() {
   for (Audio audio : idToAudioMap.values()) {
     audio.destroy();
   }
 }