mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-10 03:35:10 +00:00
Games that override ondestroy now destroy their inputs when they are destroyed (#449)
This commit is contained in:
parent
cc787c5f36
commit
f0b68bdcd1
27 changed files with 111 additions and 1 deletions
|
@ -110,6 +110,10 @@ namespace HeavenStudio.Games
|
|||
void OnDestroy()
|
||||
{
|
||||
if (queuedVoiceLines.Count > 0) queuedVoiceLines.Clear();
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
void Start()
|
||||
|
|
|
@ -116,6 +116,10 @@ namespace HeavenStudio.Games
|
|||
rightCrumbAppearThreshold = 15;
|
||||
leftCrumbAppearThreshold = 30;
|
||||
eatenTreats = 0;
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
|
|
|
@ -181,6 +181,10 @@ namespace HeavenStudio.Games
|
|||
currentShooterColor = Color.white;
|
||||
currentEnvironmentColor = new Color(0, 1, 0, 1);
|
||||
UpdateColors();
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
private void Start()
|
||||
|
|
|
@ -178,6 +178,10 @@ namespace HeavenStudio.Games
|
|||
void OnDestroy()
|
||||
{
|
||||
Jukebox.KillLoop(SpinningLoop, 0.5f);
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnTimeChange()
|
||||
|
|
|
@ -185,6 +185,10 @@ namespace HeavenStudio.Games
|
|||
if (!Conductor.instance.isPlaying || Conductor.instance.isPaused) {
|
||||
if (queuedThrows.Count > 0) queuedThrows.Clear();
|
||||
}
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
|
|
@ -116,6 +116,10 @@ namespace HeavenStudio.Games
|
|||
|
||||
private void OnDestroy() {
|
||||
queuedBalls.Clear();
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
|
|
|
@ -132,6 +132,10 @@ namespace HeavenStudio.Games
|
|||
void OnDestroy()
|
||||
{
|
||||
if (queuedFireworks.Count > 0) queuedFireworks.Clear();
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
void Awake()
|
||||
|
|
|
@ -166,6 +166,10 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
||||
}
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
|
|
|
@ -188,6 +188,10 @@ namespace HeavenStudio.Games
|
|||
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
||||
if (queuedAttentions.Count > 0) queuedAttentions.Clear();
|
||||
if (queuedFlipperRollVoiceLines.Count > 0) queuedFlipperRollVoiceLines.Clear();
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
|
|
@ -178,6 +178,10 @@ namespace HeavenStudio.Games
|
|||
if (queuedSingings.Count > 0) queuedSingings.Clear();
|
||||
if (queuedBatons.Count > 0) queuedBatons.Clear();
|
||||
}
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
|
|
|
@ -205,6 +205,10 @@ namespace HeavenStudio.Games
|
|||
void OnDestroy()
|
||||
{
|
||||
if (queuedRockets.Count > 0) queuedRockets.Clear();
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
void Awake()
|
||||
|
|
|
@ -194,6 +194,10 @@ namespace HeavenStudio.Games
|
|||
void OnDestroy()
|
||||
{
|
||||
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAndRenderSlaves()
|
||||
|
|
|
@ -119,6 +119,10 @@ namespace HeavenStudio.Games
|
|||
if (queuedIntervals.Count > 0) queuedIntervals.Clear();
|
||||
intervalStarted = false;
|
||||
}
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
|
|
@ -134,6 +134,10 @@ namespace HeavenStudio.Games
|
|||
// these variables wouldn't get reset, even when you go in and out of unity play mode???
|
||||
shouldBlip = false;
|
||||
stepIterate = 0;
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
public void Update()
|
||||
|
|
|
@ -244,6 +244,11 @@ namespace HeavenStudio.Games
|
|||
inputsTilGrow = 10;
|
||||
noBlush = false;
|
||||
disableBaby = false;
|
||||
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
|
|
@ -229,6 +229,11 @@ namespace HeavenStudio.Games
|
|||
if (queuedPops.Count > 0) queuedPops.Clear();
|
||||
|
||||
mat.SetColor("_ColorAlpha", new Color(0.97f, 0.235f, 0.54f));
|
||||
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
|
|
@ -195,6 +195,10 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
||||
}
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
void Awake()
|
||||
|
|
|
@ -269,6 +269,10 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
crHandlerInstance = null;
|
||||
}
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
public static void SpawnHairInactive(float beat)
|
||||
|
|
|
@ -164,6 +164,10 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
if (queuedPoses.Count > 0) queuedPoses.Clear();
|
||||
Jukebox.KillLoop(kidsLaugh, 2f);
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnTimeChange()
|
||||
|
|
|
@ -545,6 +545,10 @@ namespace HeavenStudio.Games
|
|||
}
|
||||
if (queuedCameraEvents.Count > 0) queuedCameraEvents.Clear();
|
||||
if (queuedPreInterval.Count > 0) queuedPreInterval.Clear();
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
|
|
@ -94,6 +94,10 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
if (queuedGhosts.Count > 0) queuedGhosts.Clear();
|
||||
Conductor.instance.SetMinigamePitch(1f);
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
void Awake()
|
||||
|
|
|
@ -156,6 +156,10 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
||||
}
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
|
|
|
@ -165,6 +165,10 @@ namespace HeavenStudio.Games
|
|||
if (queuedSteps.Count > 0) queuedSteps.Clear();
|
||||
if (queuedTaps.Count > 0) queuedTaps.Clear();
|
||||
prepareTap = false;
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnTimeChange()
|
||||
|
|
|
@ -209,6 +209,10 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
if (queuedPoses.Count > 0) queuedPoses.Clear();
|
||||
if (queuedCrouches.Count > 0) queuedCrouches.Clear();
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
void Awake()
|
||||
|
|
|
@ -101,6 +101,10 @@ namespace HeavenStudio.Games
|
|||
void OnDestroy()
|
||||
{
|
||||
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
|
|
|
@ -85,6 +85,10 @@ namespace HeavenStudio.Games
|
|||
void OnDestroy()
|
||||
{
|
||||
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
private void Start()
|
||||
|
|
|
@ -477,6 +477,10 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
if (queuedIntervals.Count > 0) queuedIntervals.Clear();
|
||||
if (queuedBalls.Count > 0) queuedBalls.Clear();
|
||||
foreach (var evt in scheduledInputs)
|
||||
{
|
||||
evt.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
|
|
Loading…
Reference in a new issue