SoundController refactoring.
- Added enum classes SoundEffect and HitSound. - Added a SoundComponent interface for sound effects and hit sounds, and extended playSound() and playHitSound() methods to play any SoundComponent. - Moved features related to sample sets to the HitSound class, and rewrote sample sets as an internal enum class. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
|
||||
package itdelatrisu.opsu;
|
||||
|
||||
import itdelatrisu.opsu.audio.SoundController;
|
||||
import itdelatrisu.opsu.audio.SoundEffect;
|
||||
import itdelatrisu.opsu.states.Options;
|
||||
|
||||
import java.awt.Font;
|
||||
@@ -476,7 +478,7 @@ public class Utils {
|
||||
File file = new File(dir, String.format("screenshot_%s.%s",
|
||||
date.format(new Date()), Options.getScreenshotFormat()));
|
||||
|
||||
SoundController.playSound(SoundController.SOUND_SHUTTER);
|
||||
SoundController.playSound(SoundEffect.SHUTTER);
|
||||
|
||||
// copy the screen
|
||||
Image screen = new Image(container.getWidth(), container.getHeight());
|
||||
|
||||
Reference in New Issue
Block a user