clear queued inputs OnDestroy

This commit is contained in:
minenice55 2023-01-22 14:21:13 -05:00
parent efb0504657
commit 0f851d6911
2 changed files with 12 additions and 1 deletions

View file

@ -138,6 +138,11 @@ namespace HeavenStudio.Games
monkeyAnimator.Play("MonkeyIdle", 0, 0);
}
void OnDestroy()
{
if (queuedInputs.Count > 0) queuedInputs.Clear();
}
void Update()
{
if (!Conductor.instance.isPlaying || Conductor.instance.isPaused)

View file

@ -469,6 +469,12 @@ namespace HeavenStudio.Games
}
}
void OnDestroy()
{
if (queuedIntervals.Count > 0) queuedIntervals.Clear();
if (queuedBalls.Count > 0) queuedBalls.Clear();
}
void Update()
{
Conductor cond = Conductor.instance;
@ -477,7 +483,7 @@ namespace HeavenStudio.Games
if (queuedIntervals.Count > 0) queuedIntervals.Clear();
if (queuedBalls.Count > 0) queuedBalls.Clear();
}
if (spaceshipRising) spaceshipAnimator.DoScaledAnimation("RiseSpaceship", risingStartBeat, risingLength);
if (liftingDoughDudes) doughDudesHolderAnim.DoScaledAnimation(liftingAnimName, liftingStartBeat, liftingLength);
if (gandwMoving) gandwAnim.DoScaledAnimation(gandwMovingAnimName, gandMovingStartBeat, gandMovingLength);