From 9fffcb46aad94c652ba7fe06562ea4fe7fd1c8ea Mon Sep 17 00:00:00 2001 From: ThatZeoMan <67521686+ThatZeoMan@users.noreply.github.com> Date: Thu, 11 Aug 2022 22:39:30 -0500 Subject: [PATCH] added shadow type to set bg effects oi mate thats a lotta events ya got there, want me to clean em up for ya? i dont know how it would happen but by god we need array-based properties --- Assets/Scripts/Beatmap.cs | 4 ++++ Assets/Scripts/Games/KarateMan/KarateMan.cs | 25 +++++++++++++-------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/Assets/Scripts/Beatmap.cs b/Assets/Scripts/Beatmap.cs index 0c704fdc..82e6885a 100644 --- a/Assets/Scripts/Beatmap.cs +++ b/Assets/Scripts/Beatmap.cs @@ -30,6 +30,7 @@ namespace HeavenStudio public int track; // consideration: use arrays instead of hardcoding fixed parameter names + // note from zeo: yeah definately use arrays [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public float length; [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public float valA; [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public float valB; @@ -38,6 +39,9 @@ namespace HeavenStudio [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public int type; [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public int type2; [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public int type3; + [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public int type4; + [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public int type5; + [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public int type6; [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public EasingFunction.Ease ease; [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public Color colorA; [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public Color colorB; diff --git a/Assets/Scripts/Games/KarateMan/KarateMan.cs b/Assets/Scripts/Games/KarateMan/KarateMan.cs index 13930f68..55259046 100644 --- a/Assets/Scripts/Games/KarateMan/KarateMan.cs +++ b/Assets/Scripts/Games/KarateMan/KarateMan.cs @@ -36,22 +36,20 @@ namespace HeavenStudio.Games.Loaders new Param("type", KarateMan.HitThree.HitThree, "Type", "The warning text to show") }), new GameAction("prepare", delegate { var e = eventCaller.currentEntity; KarateMan.instance.Prepare(e.beat, e.length);}, 1f, true), - new GameAction("set background effects", delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetBgAndShadowCol(e.beat, e.length, e.type, e.type2, e.colorA, e.colorB, e.type3); }, 0.5f, true, new List() + new GameAction("set background effects", delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetBgAndShadowCol(e.beat, e.length, e.type, e.type2, e.colorA, e.colorB, e.type3); KarateMan.instance.SetBgTexture(e.type4, e.type5, e.colorC, e.colorD); }, 0.5f, true, new List() { new Param("type", KarateMan.BackgroundType.Yellow, "Background Type", "The preset background type"), new Param("type2", KarateMan.ShadowType.Tinted, "Shadow Type", "The shadow type. If Tinted doesn't work with your background color try Custom"), new Param("colorA", new Color(), "Custom Background Color", "The background color to use when background type is set to Custom"), new Param("colorB", new Color(), "Custom Shadow Color", "The shadow color to use when shadow type is set to Custom. When fading the background colour shadows fade to this color"), - new Param("type3", KarateMan.BackgroundFXType.None, "FX Type", "The background effect to be displayed. Fade uses the entity length to determine colour fading speed") + new Param("type3", KarateMan.BackgroundFXType.None, "FX Type", "The background effect to be displayed. Fade uses the entity length to determine colour fading speed"), + new Param("type4", KarateMan.BackgroundTextureType.Plain, "Texture", "The type of background texture to use"), + new Param("type5", KarateMan.ShadowType.Tinted, "Color Filter Type", "The method used to apply colour to the texture"), + new Param("colorC", new Color(), "Custom Filter Color", "The filter color to use when color filter type is set to Custom"), + new Param("colorD", new Color(), "Fading Filter Color", "When using the Fade background effect, make filter colour fade to this colour"), }), - new GameAction("set background texture", delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetBgTexture(e.type, e.type2, e.colorA, e.colorB); }, 0.5f, false, new List() - { - new Param("type", KarateMan.BackgroundTextureType.Plain, "Texture", "The type of background texture to use"), - new Param("type2", KarateMan.ShadowType.Tinted, "Color Filter Type", "The method used to apply colour to the texture"), - new Param("colorA", new Color(), "Custom Filter Color", "The filter color to use when color filter type is set to Custom"), - new Param("colorB", new Color(), "Fading Filter Color", "When using the Fade background effect, make filter colour fade to this colour"), - }), + new GameAction("special camera", delegate { var e = eventCaller.currentEntity; KarateMan.instance.DoSpecialCamera(e.beat, e.length, e.toggle); }, 8f, true, new List() { new Param("toggle", true, "Return Camera", "Camera zooms back in?"), @@ -97,6 +95,15 @@ namespace HeavenStudio.Games.Loaders }, hidden: true), + new GameAction("set background texture", delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetBgTexture(e.type, e.type2, e.colorA, e.colorB); }, 0.5f, false, new List() + { + new Param("type", KarateMan.BackgroundTextureType.Plain, "Texture", "The type of background texture to use"), + new Param("type2", KarateMan.ShadowType.Tinted, "Color Filter Type", "The method used to apply colour to the texture"), + new Param("colorA", new Color(), "Custom Filter Color", "The filter color to use when color filter type is set to Custom"), + new Param("colorB", new Color(), "Fading Filter Color", "When using the Fade background effect, make filter colour fade to this colour"), + }, + hidden: true), + }); } }