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:
Rapandrasmus
2023-11-23 17:19:39 +01:00
committed by GitHub
parent a96879db8b
commit 9c37ec4216
36 changed files with 365 additions and 374 deletions

View File

@ -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)