From 76bf6eefa65208f2856d30bf6acc75af6a5b9139 Mon Sep 17 00:00:00 2001 From: Rapandrasmus <78219215+Rapandrasmus@users.noreply.github.com> Date: Mon, 12 Jun 2023 11:58:31 +0200 Subject: [PATCH] You can now place inputs on top of pass turn for rhythm tweezers --- .../Games/RhythmTweezers/RhythmTweezers.cs | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Assets/Scripts/Games/RhythmTweezers/RhythmTweezers.cs b/Assets/Scripts/Games/RhythmTweezers/RhythmTweezers.cs index 9d2122d9..5bd48436 100644 --- a/Assets/Scripts/Games/RhythmTweezers/RhythmTweezers.cs +++ b/Assets/Scripts/Games/RhythmTweezers/RhythmTweezers.cs @@ -368,6 +368,30 @@ namespace HeavenStudio.Games } } crHandlerInstance.queuedEvents.Clear(); + BeatAction.New(instance.gameObject, new List() + { + new BeatAction.Action(beat + length, delegate + { + if (crHandlerInstance.queuedEvents.Count > 0) + { + hairsLeft += crHandlerInstance.queuedEvents.Count; + foreach (var crEvent in crHandlerInstance.queuedEvents) + { + if (crEvent.tag == "Hair") + { + Hair hairToInput = spawnedHairs.Find(x => x.createBeat == crEvent.beat); + hairToInput.StartInput(beat + length, crEvent.relativeBeat); + } + else if (crEvent.tag == "Long") + { + LongHair hairToInput = spawnedLongs.Find(x => x.createBeat == crEvent.beat); + hairToInput.StartInput(beat + length, crEvent.relativeBeat); + } + } + crHandlerInstance.queuedEvents.Clear(); + } + }) + }); } }