mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-13 11:37:40 +02:00
Bop Refactor + Tweaks/Fixes (#582)
* blue bear tweaks * OnBeatPulse callback added * Fixing humming bug in BM + Metronome fix + Some games conversion to onbeatpulse * clappy trio to drumming practice * rest of the games converted * two minor changes
This commit is contained in:
@ -206,7 +206,6 @@ namespace HeavenStudio.Games
|
||||
bool autoAction;
|
||||
double intervalStartBeat;
|
||||
float beatInterval = 1f;
|
||||
double lastReportedBeat;
|
||||
|
||||
static List<double> queuedSqueezes = new();
|
||||
static List<double> queuedReleases = new();
|
||||
@ -253,6 +252,23 @@ namespace HeavenStudio.Games
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
if (bopIterate >= 3)
|
||||
{
|
||||
bopStatus =
|
||||
bopIterate = 0;
|
||||
autoAction = false;
|
||||
}
|
||||
|
||||
if (autoAction) bopIterate++;
|
||||
|
||||
foreach (var octo in octopodes)
|
||||
{
|
||||
octo.RequestBop();
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
BackgroundColorUpdate();
|
||||
@ -261,17 +277,6 @@ namespace HeavenStudio.Games
|
||||
if (Text.text is "Wrong! Try Again!" or "Good!") Text.text = "";
|
||||
queuePrepare = double.MaxValue;
|
||||
}
|
||||
|
||||
if (Conductor.instance.ReportBeat(ref lastReportedBeat))
|
||||
{
|
||||
if (bopIterate >= 3) {
|
||||
bopStatus =
|
||||
bopIterate = 0;
|
||||
autoAction = false;
|
||||
}
|
||||
|
||||
if (autoAction) bopIterate++;
|
||||
}
|
||||
}
|
||||
|
||||
public void ChangeText(string text, string youText)
|
||||
|
Reference in New Issue
Block a user