clean up event queues

This commit is contained in:
minenice55 2024-01-17 18:49:14 -05:00
parent da5a57e9d9
commit 95abe577bd
4 changed files with 18 additions and 6 deletions

View file

@ -229,6 +229,12 @@ namespace HeavenStudio.Games
evt.Disable(); evt.Disable();
} }
} }
public override void OnPlay(double beat)
{
queuedInputs.Clear();
queuedAttentions.Clear();
queuedFlipperRollVoiceLines.Clear();
}
public override void OnBeatPulse(double beat) public override void OnBeatPulse(double beat)
{ {
@ -322,12 +328,6 @@ namespace HeavenStudio.Games
} }
} }
} }
else if (!cond.isPlaying)
{
queuedInputs.Clear();
queuedAttentions.Clear();
queuedFlipperRollVoiceLines.Clear();
}
} }
public void ToggleTuck() public void ToggleTuck()

View file

@ -280,6 +280,7 @@ namespace HeavenStudio.Games
{ {
rt.Release(); rt.Release();
} }
queuedInputs.Clear();
} }
private static bool ForceStepOnBeat(double beat) private static bool ForceStepOnBeat(double beat)
@ -310,6 +311,7 @@ namespace HeavenStudio.Games
public override void OnPlay(double beat) public override void OnPlay(double beat)
{ {
queuedInputs.Clear();
QueueSwitchBGs(beat); QueueSwitchBGs(beat);
PersistColors(beat); PersistColors(beat);
} }

View file

@ -389,6 +389,11 @@ namespace HeavenStudio.Games
public override void OnPlay(double beat) public override void OnPlay(double beat)
{ {
if (queuedSqueezes.Count > 0) queuedSqueezes.Clear();
if (queuedReleases.Count > 0) queuedReleases.Clear();
if (queuedPops.Count > 0) queuedPops.Clear();
queuePrepare = double.MaxValue;
PersistColor(beat); PersistColor(beat);
} }

View file

@ -126,6 +126,11 @@ namespace HeavenStudio.Games
} }
} }
public override void OnPlay(double beat)
{
queuedInputs.Clear();
}
private void Start() private void Start()
{ {
handStart = -1f; handStart = -1f;