BTSDS: Piano notes will now stop properly even if the game switches during them.

This commit is contained in:
Jenny Crowe
2022-03-09 20:50:19 -07:00
parent 5a56ecf261
commit 84c4e8fc9f
3 changed files with 27 additions and 4 deletions

View File

@ -190,10 +190,7 @@ namespace RhythmHeavenMania.Games.BuiltToScaleDS
var pianoPitch = Mathf.Pow(2f, (1f / 12f) * semiTones) *Conductor.instance.musicSource.pitch;
var pianoSource = Jukebox.PlayOneShotGame("builtToScaleDS/Piano", -1, pianoPitch, 0.8f, true);
BeatAction.New(gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length, delegate { Jukebox.KillLoop(pianoSource, 0.1f); })
});
Jukebox.SetLoopParams(pianoSource, beat + length, 0.1f);
}
}
}