offbeats now work
This commit is contained in:
parent
7b6c6b319a
commit
c6c3cdb3c8
|
@ -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)
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue