From 48b83faa6835bd0e8bbca084d766f0f96e11eb0b Mon Sep 17 00:00:00 2001 From: Carson Kompon Date: Mon, 28 Feb 2022 19:46:55 -0500 Subject: [PATCH 1/2] Added support for variable lions in Clappy Trio You can also just have 1 lion --- Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs | 37 +++++++------------ 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs b/Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs index 5b3b566a..03e5aac8 100644 --- a/Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs +++ b/Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs @@ -32,30 +32,24 @@ namespace RhythmHeavenMania.Games.ClappyTrio private void Start() { - float maxWidth = 9.2f; - float minus = 0; + float startPos = -3.066667f; + float maxWidth = 12.266668f; - float newSpacing = maxWidth / lionCount; - - if (lionCount > 3) + for (int i = 0; i < lionCount; i++) { - Lion[0].transform.localPosition = new Vector3(-1.5f, 0); - maxWidth = 6.2f; - minus = 1.5f; - } + GameObject lion; + if (i == 0) + lion = Lion[0]; + else + lion = Instantiate(Lion[0], Lion[0].transform.parent); - for (int i = 1; i < lionCount; i++) - { - GameObject lion = Instantiate(Lion[0], Lion[0].transform.parent); + lion.transform.localPosition = new Vector3(startPos + ((maxWidth / (lionCount + 1)) * (i + 1)), 0); - // lion.transform.localPosition = new Vector3(Lion[0].transform.localPosition.x + (1.0333f * lionCount) - i, 0); - lion.transform.localPosition = new Vector3((newSpacing) * (i) - minus, 0); - Lion.Add(lion); + if (i > 0) + Lion.Add(lion); if (i == lionCount - 1) - { ClappyTrioPlayer = lion.AddComponent(); - } } } @@ -86,8 +80,7 @@ namespace RhythmHeavenMania.Games.ClappyTrio isClapping = false; currentClappingLength = 0; ClappyTrioPlayer.clapStarted = false; - } - else + } else { SetFace(i, 4); Lion[i].GetComponent().Play("Clap", 0, 0); @@ -135,8 +128,7 @@ namespace RhythmHeavenMania.Games.ClappyTrio { SetFace(i, 1); } - } - else + } else { var a = EventCaller.GetAllInGameManagerList("clappyTrio", new string[] { "clap" }); var b = a.FindAll(c => c.beat < beat); @@ -148,8 +140,7 @@ namespace RhythmHeavenMania.Games.ClappyTrio if (i == Lion.Count - 1) { SetFace(i, 0); - } - else + } else { SetFace(i, 2); } From 5d99596c6705166607c66fd3a982ea7a82049b6b Mon Sep 17 00:00:00 2001 From: Carson Kompon Date: Mon, 28 Feb 2022 20:11:01 -0500 Subject: [PATCH 2/2] Added Change Lion Count event to Clappy Trio 1-8 lions thats crazy --- Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs | 13 +++++++++++++ Assets/Scripts/Minigames.cs | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs b/Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs index 03e5aac8..1d236c83 100644 --- a/Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs +++ b/Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs @@ -150,6 +150,19 @@ namespace RhythmHeavenMania.Games.ClappyTrio PlayAnimationAll("Bop"); } + public void ChangeLionCount(int lions) + { + for(int i=1; i() + { + new Param("valA", new EntityTypes.Integer(1, 8, 3), "Lion Count") + }), }), new Minigame("spaceball", "Spaceball", "00A518", false, false, new List() {