From c196947251d8fa588f1b4129d47c99216227c45f 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 9d2122d9f..5bd484366 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(); + } + }) + }); } }