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()
|
void OnDestroy()
|
||||||
{
|
{
|
||||||
if (queuedVoiceLines.Count > 0) queuedVoiceLines.Clear();
|
if (queuedVoiceLines.Count > 0) queuedVoiceLines.Clear();
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
|
|
|
@ -116,6 +116,10 @@ namespace HeavenStudio.Games
|
||||||
rightCrumbAppearThreshold = 15;
|
rightCrumbAppearThreshold = 15;
|
||||||
leftCrumbAppearThreshold = 30;
|
leftCrumbAppearThreshold = 30;
|
||||||
eatenTreats = 0;
|
eatenTreats = 0;
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
|
|
|
@ -181,6 +181,10 @@ namespace HeavenStudio.Games
|
||||||
currentShooterColor = Color.white;
|
currentShooterColor = Color.white;
|
||||||
currentEnvironmentColor = new Color(0, 1, 0, 1);
|
currentEnvironmentColor = new Color(0, 1, 0, 1);
|
||||||
UpdateColors();
|
UpdateColors();
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
|
|
|
@ -178,6 +178,10 @@ namespace HeavenStudio.Games
|
||||||
void OnDestroy()
|
void OnDestroy()
|
||||||
{
|
{
|
||||||
Jukebox.KillLoop(SpinningLoop, 0.5f);
|
Jukebox.KillLoop(SpinningLoop, 0.5f);
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnTimeChange()
|
public override void OnTimeChange()
|
||||||
|
|
|
@ -185,6 +185,10 @@ namespace HeavenStudio.Games
|
||||||
if (!Conductor.instance.isPlaying || Conductor.instance.isPaused) {
|
if (!Conductor.instance.isPlaying || Conductor.instance.isPaused) {
|
||||||
if (queuedThrows.Count > 0) queuedThrows.Clear();
|
if (queuedThrows.Count > 0) queuedThrows.Clear();
|
||||||
}
|
}
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
|
|
|
@ -116,6 +116,10 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
private void OnDestroy() {
|
private void OnDestroy() {
|
||||||
queuedBalls.Clear();
|
queuedBalls.Clear();
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
|
|
|
@ -132,6 +132,10 @@ namespace HeavenStudio.Games
|
||||||
void OnDestroy()
|
void OnDestroy()
|
||||||
{
|
{
|
||||||
if (queuedFireworks.Count > 0) queuedFireworks.Clear();
|
if (queuedFireworks.Count > 0) queuedFireworks.Clear();
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
|
|
|
@ -166,6 +166,10 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
||||||
}
|
}
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
|
|
|
@ -188,6 +188,10 @@ namespace HeavenStudio.Games
|
||||||
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
||||||
if (queuedAttentions.Count > 0) queuedAttentions.Clear();
|
if (queuedAttentions.Count > 0) queuedAttentions.Clear();
|
||||||
if (queuedFlipperRollVoiceLines.Count > 0) queuedFlipperRollVoiceLines.Clear();
|
if (queuedFlipperRollVoiceLines.Count > 0) queuedFlipperRollVoiceLines.Clear();
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
|
|
|
@ -178,6 +178,10 @@ namespace HeavenStudio.Games
|
||||||
if (queuedSingings.Count > 0) queuedSingings.Clear();
|
if (queuedSingings.Count > 0) queuedSingings.Clear();
|
||||||
if (queuedBatons.Count > 0) queuedBatons.Clear();
|
if (queuedBatons.Count > 0) queuedBatons.Clear();
|
||||||
}
|
}
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
|
|
|
@ -205,6 +205,10 @@ namespace HeavenStudio.Games
|
||||||
void OnDestroy()
|
void OnDestroy()
|
||||||
{
|
{
|
||||||
if (queuedRockets.Count > 0) queuedRockets.Clear();
|
if (queuedRockets.Count > 0) queuedRockets.Clear();
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
|
|
|
@ -194,6 +194,10 @@ namespace HeavenStudio.Games
|
||||||
void OnDestroy()
|
void OnDestroy()
|
||||||
{
|
{
|
||||||
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAndRenderSlaves()
|
void UpdateAndRenderSlaves()
|
||||||
|
|
|
@ -119,6 +119,10 @@ namespace HeavenStudio.Games
|
||||||
if (queuedIntervals.Count > 0) queuedIntervals.Clear();
|
if (queuedIntervals.Count > 0) queuedIntervals.Clear();
|
||||||
intervalStarted = false;
|
intervalStarted = false;
|
||||||
}
|
}
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
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???
|
// these variables wouldn't get reset, even when you go in and out of unity play mode???
|
||||||
shouldBlip = false;
|
shouldBlip = false;
|
||||||
stepIterate = 0;
|
stepIterate = 0;
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Update()
|
public void Update()
|
||||||
|
|
|
@ -244,6 +244,11 @@ namespace HeavenStudio.Games
|
||||||
inputsTilGrow = 10;
|
inputsTilGrow = 10;
|
||||||
noBlush = false;
|
noBlush = false;
|
||||||
disableBaby = false;
|
disableBaby = false;
|
||||||
|
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
|
|
|
@ -229,6 +229,11 @@ namespace HeavenStudio.Games
|
||||||
if (queuedPops.Count > 0) queuedPops.Clear();
|
if (queuedPops.Count > 0) queuedPops.Clear();
|
||||||
|
|
||||||
mat.SetColor("_ColorAlpha", new Color(0.97f, 0.235f, 0.54f));
|
mat.SetColor("_ColorAlpha", new Color(0.97f, 0.235f, 0.54f));
|
||||||
|
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
|
|
|
@ -195,6 +195,10 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
||||||
}
|
}
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
|
|
|
@ -269,6 +269,10 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
crHandlerInstance = null;
|
crHandlerInstance = null;
|
||||||
}
|
}
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SpawnHairInactive(float beat)
|
public static void SpawnHairInactive(float beat)
|
||||||
|
|
|
@ -164,6 +164,10 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
if (queuedPoses.Count > 0) queuedPoses.Clear();
|
if (queuedPoses.Count > 0) queuedPoses.Clear();
|
||||||
Jukebox.KillLoop(kidsLaugh, 2f);
|
Jukebox.KillLoop(kidsLaugh, 2f);
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnTimeChange()
|
public override void OnTimeChange()
|
||||||
|
|
|
@ -545,6 +545,10 @@ namespace HeavenStudio.Games
|
||||||
}
|
}
|
||||||
if (queuedCameraEvents.Count > 0) queuedCameraEvents.Clear();
|
if (queuedCameraEvents.Count > 0) queuedCameraEvents.Clear();
|
||||||
if (queuedPreInterval.Count > 0) queuedPreInterval.Clear();
|
if (queuedPreInterval.Count > 0) queuedPreInterval.Clear();
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
|
|
|
@ -94,6 +94,10 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
if (queuedGhosts.Count > 0) queuedGhosts.Clear();
|
if (queuedGhosts.Count > 0) queuedGhosts.Clear();
|
||||||
Conductor.instance.SetMinigamePitch(1f);
|
Conductor.instance.SetMinigamePitch(1f);
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
|
|
|
@ -156,6 +156,10 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
||||||
}
|
}
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
|
|
|
@ -165,6 +165,10 @@ namespace HeavenStudio.Games
|
||||||
if (queuedSteps.Count > 0) queuedSteps.Clear();
|
if (queuedSteps.Count > 0) queuedSteps.Clear();
|
||||||
if (queuedTaps.Count > 0) queuedTaps.Clear();
|
if (queuedTaps.Count > 0) queuedTaps.Clear();
|
||||||
prepareTap = false;
|
prepareTap = false;
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnTimeChange()
|
public override void OnTimeChange()
|
||||||
|
|
|
@ -209,6 +209,10 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
if (queuedPoses.Count > 0) queuedPoses.Clear();
|
if (queuedPoses.Count > 0) queuedPoses.Clear();
|
||||||
if (queuedCrouches.Count > 0) queuedCrouches.Clear();
|
if (queuedCrouches.Count > 0) queuedCrouches.Clear();
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
|
|
|
@ -101,6 +101,10 @@ namespace HeavenStudio.Games
|
||||||
void OnDestroy()
|
void OnDestroy()
|
||||||
{
|
{
|
||||||
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
|
|
|
@ -85,6 +85,10 @@ namespace HeavenStudio.Games
|
||||||
void OnDestroy()
|
void OnDestroy()
|
||||||
{
|
{
|
||||||
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
if (queuedInputs.Count > 0) queuedInputs.Clear();
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
|
|
|
@ -477,6 +477,10 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
if (queuedIntervals.Count > 0) queuedIntervals.Clear();
|
if (queuedIntervals.Count > 0) queuedIntervals.Clear();
|
||||||
if (queuedBalls.Count > 0) queuedBalls.Clear();
|
if (queuedBalls.Count > 0) queuedBalls.Clear();
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
|
|
Loading…
Reference in a new issue