Misc Additions #4 (#192)

* update icons

* add background loading of sound sequences

- fix bug with preFunction
- remove most of the old preloading code

* update spritesheets for karate man, marching orders

* file explorer chart loading

* update icon for trick on the class
This commit is contained in:
minenice55
2023-01-11 20:42:12 -05:00
committed by GitHub
parent ddc183acdd
commit 41e9d36177
89 changed files with 1970 additions and 459 deletions

View File

@ -38,6 +38,10 @@ namespace HeavenStudio
private double dspStartTime;
public double dspStartTimeAsDouble => dspStartTime;
//the beat we started at
private double startBeat;
public double startBeatAsDouble => startBeat;
// an AudioSource attached to this GameObject that will play the music.
public AudioSource musicSource;
@ -150,6 +154,7 @@ namespace HeavenStudio
}
lastAbsTime = Time.realtimeSinceStartupAsDouble;
dspStartTime = AudioSettings.dspTime;
startBeat = beat;
// GameManager.instance.SetCurrentEventToClosest(songPositionInBeats);
}
@ -193,7 +198,7 @@ namespace HeavenStudio
public void LateUpdate()
{
if (metronome)
if (metronome && isPlaying)
{
if (ReportBeat(ref lastReportedBeat))
{
@ -260,7 +265,7 @@ namespace HeavenStudio
return GameManager.instance.Beatmap.tempoChanges;
}
public double GetSongPosFromBeat(float beat)
public double GetSongPosFromBeat(double beat)
{
var chart = GameManager.instance.Beatmap;
SetBpm(chart.bpm);