mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-15 06:05:10 +00:00
quick mr upbeat fix (#547)
This commit is contained in:
parent
607ae9b542
commit
b6d2e2d355
1 changed files with 22 additions and 21 deletions
|
@ -219,16 +219,17 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
public static void Ding(double beat, bool applause, bool stopBlipping, bool playDing)
|
public static void Ding(double beat, bool applause, bool stopBlipping, bool playDing)
|
||||||
{
|
{
|
||||||
|
BeatAction.New(instance, new List<BeatAction.Action>() {
|
||||||
|
new BeatAction.Action(beat - 0.5, delegate {
|
||||||
instance.stopStepping = true;
|
instance.stopStepping = true;
|
||||||
if (stopBlipping) instance.stopBlipping = true;
|
if (stopBlipping) instance.stopBlipping = true;
|
||||||
if (playDing) SoundByte.PlayOneShotGame("mrUpbeat/ding", beat: beat, forcePlay: true);
|
}),
|
||||||
if (applause) SoundByte.PlayOneShot("applause", beat: beat);
|
|
||||||
BeatAction.New(instance, new List<BeatAction.Action>() {
|
|
||||||
new BeatAction.Action(beat + 0.5, delegate {
|
new BeatAction.Action(beat + 0.5, delegate {
|
||||||
instance.stopStepping = false;
|
instance.stopStepping = false;
|
||||||
instance.stopBlipping = false;
|
}),
|
||||||
})
|
|
||||||
});
|
});
|
||||||
|
if (playDing) SoundByte.PlayOneShotGame("mrUpbeat/ding", beat: beat, forcePlay: true);
|
||||||
|
if (applause) SoundByte.PlayOneShot("applause", beat: beat);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void PrePrepare(double beat, float length, bool forceOffbeat)
|
public static void PrePrepare(double beat, float length, bool forceOffbeat)
|
||||||
|
@ -256,7 +257,7 @@ namespace HeavenStudio.Games
|
||||||
SoundByte.PlayOneShotGame("mrUpbeat/metronome" + dir);
|
SoundByte.PlayOneShotGame("mrUpbeat/metronome" + dir);
|
||||||
ScheduleInput(beat, 0.5f, InputType.STANDARD_DOWN, Success, Miss, Nothing);
|
ScheduleInput(beat, 0.5f, InputType.STANDARD_DOWN, Success, Miss, Nothing);
|
||||||
BeatAction.New(this, new List<BeatAction.Action>() {
|
BeatAction.New(this, new List<BeatAction.Action>() {
|
||||||
new BeatAction.Action(beat + 1, delegate { RecursiveStepping(beat + 1); })
|
new(beat + 1, delegate { RecursiveStepping(beat + 1); })
|
||||||
});
|
});
|
||||||
stepIterate++;
|
stepIterate++;
|
||||||
}
|
}
|
||||||
|
@ -349,7 +350,7 @@ namespace HeavenStudio.Games
|
||||||
var sound = new List<MultiSound.Sound>();
|
var sound = new List<MultiSound.Sound>();
|
||||||
if (a) sound.Add(new MultiSound.Sound("mrUpbeat/a", beat - (0.5f * (length/4))));
|
if (a) sound.Add(new MultiSound.Sound("mrUpbeat/a", beat - (0.5f * (length/4))));
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
sound.Add(new MultiSound.Sound("mrUpbeat/" + (i + 1), beat + (i * (length/4)), offset: (i == 3 ? 0.05 : 0)));
|
sound.Add(new MultiSound.Sound("mrUpbeat/" + (i + 1), beat + (i * (length / 4)), offset: (i == 3) ? 0.05 : 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
MultiSound.Play(sound.ToArray(), forcePlay: true);
|
MultiSound.Play(sound.ToArray(), forcePlay: true);
|
||||||
|
|
Loading…
Reference in a new issue