Added initial sound effect support.

- Added SoundController module, which uses Java Sound since OpenAL has a slight delay on playing sounds.
- Uploaded all effect WAVs. (credits: WWWskin, AL's IA, Fantasy's Skin, Minimalist Miku)
- Added a missing entry in credits.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2014-07-01 01:14:03 -04:00
parent 60eaa42997
commit 0604a25822
54 changed files with 500 additions and 61 deletions

View File

@@ -22,6 +22,7 @@ import itdelatrisu.opsu.GUIMenuButton;
import itdelatrisu.opsu.MusicController;
import itdelatrisu.opsu.Opsu;
import itdelatrisu.opsu.OsuGroupNode;
import itdelatrisu.opsu.SoundController;
import java.text.SimpleDateFormat;
import java.util.Date;
@@ -287,17 +288,22 @@ public class MainMenu extends BasicGameState {
logoTimer = 0;
playButton.getImage().setAlpha(0f);
exitButton.getImage().setAlpha(0f);
SoundController.playSound(SoundController.SOUND_MENUHIT);
}
}
// other button actions (if visible)
else if (logoClicked) {
if (logo.contains(x, y))
if (logo.contains(x, y)) {
SoundController.playSound(SoundController.SOUND_MENUHIT);
logoTimer = MOVE_DELAY;
else if (playButton.contains(x, y))
} else if (playButton.contains(x, y)) {
SoundController.playSound(SoundController.SOUND_MENUHIT);
game.enterState(Opsu.STATE_SONGMENU, new FadeOutTransition(Color.black), new FadeInTransition(Color.black));
else if (exitButton.contains(x, y))
} else if (exitButton.contains(x, y)) {
SoundController.playSound(SoundController.SOUND_MENUHIT);
game.enterState(Opsu.STATE_MAINMENUEXIT);
}
}
}