Asset Loading Fix (#843)

* (hopefullyt) fix asset loading issue

* let mis-packed games load from res

timing display tweak

* fix initial pre-load not actually preloading needed games

fix mr upbeat metronome

* let's try this resyncing again
This commit is contained in:
minenice55
2024-04-08 22:01:18 -04:00
committed by minenice55
parent 3344220b7e
commit ef587c86bd
7 changed files with 113 additions and 85 deletions

View File

@ -96,9 +96,7 @@ namespace HeavenStudio
private float timelineVolume = 1f;
private float minigameVolume = 1f;
const bool doPitchResync = false;
public void SetTimelinePitch(float pitch, bool resync = false)
public void SetTimelinePitch(float pitch)
{
if (isPaused || deferTimeKeeping) return;
if (pitch != 0 && pitch != timelinePitch)
@ -111,17 +109,17 @@ namespace HeavenStudio
if (musicSource != null && musicSource.clip != null)
{
musicSource.pitch = SongPitch;
if (doPitchResync && isPlaying && resync && !deferTimeKeeping)
if (isPlaying && !(isPaused || deferTimeKeeping))
{
time = MapTimeToPitchChanges(absTime + absTimeAdjust);
songPos = startPos + time;
songPosBeat = GetBeatFromSongPos(songPos);
SeekMusicToTime(songPos, firstBeatOffset);
songPositionInBeatsAsDouble = GetSwungBeat(songPosBeat);
}
}
}
public void SetMinigamePitch(float pitch, bool resync = false)
public void SetMinigamePitch(float pitch)
{
if (isPaused || deferTimeKeeping || !isPlaying) return;
if (pitch != 0 && pitch != minigamePitch)
@ -134,12 +132,12 @@ namespace HeavenStudio
if (musicSource != null && musicSource.clip != null)
{
musicSource.pitch = SongPitch;
if (doPitchResync && isPlaying && resync && !deferTimeKeeping)
if (isPlaying && !(isPaused || deferTimeKeeping))
{
time = MapTimeToPitchChanges(absTime + absTimeAdjust);
songPos = startPos + time;
songPosBeat = GetBeatFromSongPos(songPos);
SeekMusicToTime(songPos, firstBeatOffset);
songPositionInBeatsAsDouble = GetSwungBeat(songPosBeat);
}
}
}
@ -171,7 +169,7 @@ namespace HeavenStudio
songPosBeat = GetBeatFromSongPos(time);
gameManager.SetCurrentEventToClosest(beat);
gameManager.SetCurrentEventToClosest(beat, true);
}
public void PlaySetup(double beat)