From 7fc8b2ab2dff62a166d5a3c018b69957fdc5b4fe Mon Sep 17 00:00:00 2001 From: Rapandrasmus <78219215+Rapandrasmus@users.noreply.github.com> Date: Fri, 15 Dec 2023 19:59:52 +0100 Subject: [PATCH] fork lifter fixes --- Assets/Scripts/Games/ForkLifter/Pea.cs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/Games/ForkLifter/Pea.cs b/Assets/Scripts/Games/ForkLifter/Pea.cs index 5b418f9ff..7bfd14230 100644 --- a/Assets/Scripts/Games/ForkLifter/Pea.cs +++ b/Assets/Scripts/Games/ForkLifter/Pea.cs @@ -92,6 +92,8 @@ namespace HeavenStudio.Games.Scripts_ForkLifter public void Early() { + player.Stab(null); + GameObject pea = new GameObject(); pea.transform.parent = player.early.transform; @@ -124,6 +126,8 @@ namespace HeavenStudio.Games.Scripts_ForkLifter public void Late() { + player.Stab(null); + GameObject pea = new GameObject(); pea.transform.parent = player.late.transform; pea.transform.localScale = Vector2.one; @@ -161,18 +165,23 @@ namespace HeavenStudio.Games.Scripts_ForkLifter private void Just(PlayerActionEvent caller, float state) { - if (state >= 1f) { + if (state >= 1f) + { Late(); - } else if (state <= -1f) { + } + else if (state <= -1f) + { Early(); - } else { + } + else + { Hit(); } } private void Miss(PlayerActionEvent caller) { - SoundByte.PlayOneShot("forkLifter/disappointed"); + SoundByte.PlayOneShotGame("forkLifter/disappointed"); BeatAction.New(game, new List() { new BeatAction.Action(startBeat+ 2.45f, delegate {