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

@@ -172,7 +172,9 @@ public class Circle {
if (distance < circleRadius) {
int result = hitResult(hitObject.time);
if (result > -1) {
score.hitResult(hitObject.time, result, hitObject.x, hitObject.y, color, comboEnd);
score.hitResult(hitObject.time, result, hitObject.x, hitObject.y,
color, comboEnd, hitObject.hitSound
);
return true;
}
}
@@ -192,11 +194,11 @@ public class Circle {
if (overlap || trackPosition > hitObject.time + hitResultOffset[GameScore.HIT_50]) {
if (isAutoMod) // "auto" mod: catch any missed notes due to lag
score.hitResult(hitObject.time, GameScore.HIT_300,
hitObject.x, hitObject.y, color, comboEnd);
hitObject.x, hitObject.y, color, comboEnd, hitObject.hitSound);
else // no more points can be scored, so send a miss
score.hitResult(hitObject.time, GameScore.HIT_MISS,
hitObject.x, hitObject.y, null, comboEnd);
hitObject.x, hitObject.y, null, comboEnd, hitObject.hitSound);
return true;
}
@@ -204,7 +206,7 @@ public class Circle {
else if (isAutoMod) {
if (Math.abs(trackPosition - hitObject.time) < hitResultOffset[GameScore.HIT_300]) {
score.hitResult(hitObject.time, GameScore.HIT_300,
hitObject.x, hitObject.y, color, comboEnd);
hitObject.x, hitObject.y, color, comboEnd, hitObject.hitSound);
return true;
}
}