diff --git a/Assets/Scripts/Games/Fillbots/NtrFillbot.cs b/Assets/Scripts/Games/Fillbots/NtrFillbot.cs index 789ec40ac..ebd144962 100644 --- a/Assets/Scripts/Games/Fillbots/NtrFillbot.cs +++ b/Assets/Scripts/Games/Fillbots/NtrFillbot.cs @@ -176,7 +176,7 @@ namespace HeavenStudio.Games.Scripts_Fillbots } } - if (beepEvent != null && beepEvent.enabled && cond.ReportBeat(ref beepEvent.lastReportedBeat)) + if (beepEvent != null && beepEvent.enabled && ReportBeat(ref beepEvent.lastReportedBeat)) { if (beepEvent.lastReportedBeat < beepEvent.startBeat + beepEvent.length) { @@ -263,6 +263,17 @@ namespace HeavenStudio.Games.Scripts_Fillbots { } + + public bool ReportBeat(ref double lastReportedBeat) + { + var cond = Conductor.instance; + bool result = cond.songPositionInBeats >= (lastReportedBeat) + 1f; + if (result) + { + lastReportedBeat += 1f; + } + return result; + } } }