First PlayerActionEvent Pass (#202)

* update blue bear to use PlayerActionEvent

* update built to scale DS to use PlayerActionEvent

* update clappy trio to use PlayerActionEvent

* update crop stomp to use PlayerActionEvent

* update drumming practice to use PlayerActionEvent

* update fork lifter to use PlayerActionEvent

* update minigame icons

* update wizard waltz' icon
This commit is contained in:
minenice55
2023-01-14 23:33:37 -05:00
committed by GitHub
parent 0115333d8b
commit 330c538947
54 changed files with 1295 additions and 378 deletions

View File

@ -265,6 +265,23 @@ namespace HeavenStudio
return GameManager.instance.Beatmap.tempoChanges;
}
public float GetBpmAtBeat(float beat)
{
var chart = GameManager.instance.Beatmap;
float bpm = chart.bpm;
foreach (DynamicBeatmap.TempoChange t in GameManager.instance.Beatmap.tempoChanges)
{
if (t.beat > beat)
{
break;
}
bpm = t.tempo;
}
return bpm;
}
public double GetSongPosFromBeat(double beat)
{
var chart = GameManager.instance.Beatmap;
@ -292,11 +309,11 @@ namespace HeavenStudio
}
//thank you @wooningcharithri#7419 for the psuedo-code
private double BeatsToSecs(double beats, float bpm)
public double BeatsToSecs(double beats, float bpm)
{
return beats / bpm * 60f;
}
private double SecsToBeats(double s, float bpm)
public double SecsToBeats(double s, float bpm)
{
return s / 60f * bpm;
}