mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-13 12:57:40 +02:00
Integration of Jukebox Library (#451)
* add Jukebox library todo: - saving / loading of new format - inferrence of unknown data like past versions - move the temporary float casts to proper use of double - make sound related functions take double for timing - inform people that the Jukebox sound player was renamed to SoundByte lol * make sound, input scheduling, and super curve use double precision * successfully load charts * editor works again v1 riqs can be saved and loaded * first tempo and volume markers are unmovable fix loading of charts' easing values * use gsync / freesync * update Jukebox refs to SoundByte * game events use double part 1 Air Rally - Glee Club converted * don't load song if chart load fails * finish conversion of all minigames * remove editor waveform toggle * timeline now respects added song offset length clear cache files on app close prepped notes for dsp sync * update timeline length when offset changed * update to latest Jukebox * make error panel object in global game manager * improve conductor music scheduling * added error message box fix first game events sometimes not playing
This commit is contained in:
@ -11,7 +11,7 @@ namespace HeavenStudio.Games.Scripts_TrickClass
|
||||
public class MobTrickObj : MonoBehaviour
|
||||
{
|
||||
public bool flyType;
|
||||
public float startBeat;
|
||||
public double startBeat;
|
||||
bool miss = false;
|
||||
|
||||
float flyBeats;
|
||||
@ -115,7 +115,7 @@ namespace HeavenStudio.Games.Scripts_TrickClass
|
||||
|
||||
public void DodgeJustOrNg(PlayerActionEvent caller, float state)
|
||||
{
|
||||
if (game.playerCanDodge <= Conductor.instance.songPositionInBeats)
|
||||
if (game.playerCanDodge <= Conductor.instance.songPositionInBeatsAsDouble)
|
||||
{
|
||||
if (state <= -1f || state >= 1f)
|
||||
{
|
||||
@ -124,15 +124,15 @@ namespace HeavenStudio.Games.Scripts_TrickClass
|
||||
MultiSound.Play(new MultiSound.Sound[] {
|
||||
new MultiSound.Sound(GetDodgeSound(), startBeat + flyBeats, volume: 0.4f),
|
||||
});
|
||||
Jukebox.PlayOneShotGame(GetDodgeSound(), volume: 0.6f);
|
||||
Jukebox.PlayOneShot("miss");
|
||||
SoundByte.PlayOneShotGame(GetDodgeSound(), volume: 0.6f);
|
||||
SoundByte.PlayOneShot("miss");
|
||||
DoObjMiss();
|
||||
}
|
||||
else
|
||||
{
|
||||
//just
|
||||
game.PlayerDodge();
|
||||
Jukebox.PlayOneShotGame("trickClass/player_dodge_success", volume: 0.8f, pitch: UnityEngine.Random.Range(0.85f, 1.15f));
|
||||
SoundByte.PlayOneShotGame("trickClass/player_dodge_success", volume: 0.8f, pitch: UnityEngine.Random.Range(0.85f, 1.15f));
|
||||
MultiSound.Play(new MultiSound.Sound[] {
|
||||
new MultiSound.Sound(GetDodgeSound(), startBeat + flyBeats, volume: 0.4f),
|
||||
});
|
||||
@ -140,7 +140,7 @@ namespace HeavenStudio.Games.Scripts_TrickClass
|
||||
}
|
||||
else
|
||||
{
|
||||
Jukebox.PlayOneShotGame(GetDodgeSound());
|
||||
SoundByte.PlayOneShotGame(GetDodgeSound());
|
||||
DoObjMiss();
|
||||
game.PlayerThrough();
|
||||
caller.isEligible = false;
|
||||
@ -150,7 +150,7 @@ namespace HeavenStudio.Games.Scripts_TrickClass
|
||||
|
||||
public void DodgeMiss(PlayerActionEvent caller)
|
||||
{
|
||||
Jukebox.PlayOneShotGame(GetDodgeSound());
|
||||
SoundByte.PlayOneShotGame(GetDodgeSound());
|
||||
DoObjMiss();
|
||||
game.PlayerThrough();
|
||||
}
|
||||
|
Reference in New Issue
Block a user