From 58bd843aeaad492383a6f429fddf03a716787e18 Mon Sep 17 00:00:00 2001 From: AstrlJelly Date: Tue, 5 Mar 2024 13:04:14 -0500 Subject: [PATCH] hotfixes (#750) --- Assets/Scripts/Games/ForkLifter/ForkLifter.cs | 4 ++-- Assets/Scripts/Games/MrUpbeat/MrUpbeat.cs | 4 ++-- Assets/Scripts/Games/SpaceDance/SpaceDance.cs | 20 ++++++++----------- Assets/Scripts/Games/Tambourine/Tambourine.cs | 2 +- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/Assets/Scripts/Games/ForkLifter/ForkLifter.cs b/Assets/Scripts/Games/ForkLifter/ForkLifter.cs index d16efd5e..ee6446a7 100644 --- a/Assets/Scripts/Games/ForkLifter/ForkLifter.cs +++ b/Assets/Scripts/Games/ForkLifter/ForkLifter.cs @@ -178,8 +178,8 @@ namespace HeavenStudio.Games fo.SetActive(true); } - private ColorEase bgColorEase = new(); - private ColorEase gradColorEase = new(); + private ColorEase bgColorEase = new(Color.white); + private ColorEase gradColorEase = new(Color.white); //call this in update private void BackgroundColorUpdate() diff --git a/Assets/Scripts/Games/MrUpbeat/MrUpbeat.cs b/Assets/Scripts/Games/MrUpbeat/MrUpbeat.cs index 6bb3bf42..3e592dab 100644 --- a/Assets/Scripts/Games/MrUpbeat/MrUpbeat.cs +++ b/Assets/Scripts/Games/MrUpbeat/MrUpbeat.cs @@ -13,9 +13,9 @@ namespace HeavenStudio.Games.Loaders public static Minigame AddGame(EventCaller eventCaller) { RiqEntity BackgroundUpdater(string datamodel, RiqEntity e) { - if (datamodel == "mrUpbeat/changeBG" && e.dynamicData.ContainsKey("toggle")) + if (datamodel == "mrUpbeat/changeBG" && e.dynamicData.ContainsKey("toggle") && !e.dynamicData.ContainsKey("ease")) { - e.dynamicData.Add("ease", (int)(e["toggle"] ? Util.EasingFunction.Ease.Instant : Util.EasingFunction.Ease.Linear)); + e.CreateProperty("ease", (int)(e["toggle"] ? Util.EasingFunction.Ease.Instant : Util.EasingFunction.Ease.Linear)); e.dynamicData.Remove("toggle"); return e; } diff --git a/Assets/Scripts/Games/SpaceDance/SpaceDance.cs b/Assets/Scripts/Games/SpaceDance/SpaceDance.cs index c91fe57e..895fb5d3 100644 --- a/Assets/Scripts/Games/SpaceDance/SpaceDance.cs +++ b/Assets/Scripts/Games/SpaceDance/SpaceDance.cs @@ -457,7 +457,7 @@ namespace HeavenStudio.Games { canBop = false; if (grampsTurns) grampsCanBop = false; - ScheduleInput(beat, 1f, InputAction_Turn, JustRight, RightMiss, Empty); + ScheduleInput(beat, 1f, InputAction_Turn, JustRight, RightMiss, null); BeatAction.New(instance, new List() { @@ -526,7 +526,7 @@ namespace HeavenStudio.Games { canBop = false; if (grampsSits) grampsCanBop = false; - ScheduleInput(beat, 1f, InputAction_Down, JustSit, SitMiss, Empty); + ScheduleInput(beat, 1f, InputAction_Down, JustSit, SitMiss, null); BeatAction.New(instance, new List() { @@ -601,7 +601,7 @@ namespace HeavenStudio.Games { canBop = false; if (grampsPunches) grampsCanBop = false; - ScheduleInput(beat, 1.5f, InputAction_Punch, JustPunch, PunchMiss, Empty); + ScheduleInput(beat, 1.5f, InputAction_Punch, JustPunch, PunchMiss, null); BeatAction.New(instance, new List() { @@ -680,7 +680,7 @@ namespace HeavenStudio.Games Gramps.DoScaledAnimationAsync("GrampsBop", 0.5f); } - private ColorEase bgColorEase = new(); + private ColorEase bgColorEase = new(defaultBGColor); public void BackgroundColor(double beat, float length, Color startColor, Color endColor, int ease) { @@ -722,10 +722,10 @@ namespace HeavenStudio.Games } public void RightSuccess() - { + { SoundByte.PlayOneShotGame("spaceDance/inputGood"); DancerP.DoScaledAnimationAsync("TurnRightDo", 0.5f); - } + } public void RightMiss(PlayerActionEvent caller) { @@ -774,10 +774,10 @@ namespace HeavenStudio.Games } public void PunchSuccess() - { + { SoundByte.PlayOneShotGame("spaceDance/inputGood"); DancerP.DoScaledAnimationAsync("PunchDo", 0.5f); - } + } public void PunchMiss(PlayerActionEvent caller) { @@ -786,9 +786,5 @@ namespace HeavenStudio.Games Hit.Play("HitPunch", -1, 0); Gramps.DoScaledAnimationAsync("GrampsMiss", 0.5f); } - - public void Empty(PlayerActionEvent caller) { } - - } } \ No newline at end of file diff --git a/Assets/Scripts/Games/Tambourine/Tambourine.cs b/Assets/Scripts/Games/Tambourine/Tambourine.cs index aa9b263e..ee8c4418 100644 --- a/Assets/Scripts/Games/Tambourine/Tambourine.cs +++ b/Assets/Scripts/Games/Tambourine/Tambourine.cs @@ -465,7 +465,7 @@ namespace HeavenStudio.Games } } - private ColorEase bgColorEase = new(); + private ColorEase bgColorEase = new(defaultBGColor); //call this in update private void BackgroundColorUpdate()