From 2b8e558aa6f1403edae3c0c849c4f4f9d333bc0e Mon Sep 17 00:00:00 2001 From: Rapandrasmus <78219215+Rapandrasmus@users.noreply.github.com> Date: Sun, 10 Dec 2023 19:09:16 +0100 Subject: [PATCH] karate man right hand thing --- Assets/Scripts/Games/KarateMan/KarateManJoe.cs | 7 +++++-- Assets/Scripts/Games/KarateMan/KarateManPot.cs | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/Games/KarateMan/KarateManJoe.cs b/Assets/Scripts/Games/KarateMan/KarateManJoe.cs index dbc543d38..f7c7fa8d6 100644 --- a/Assets/Scripts/Games/KarateMan/KarateManJoe.cs +++ b/Assets/Scripts/Games/KarateMan/KarateManJoe.cs @@ -141,7 +141,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan { if (!KarateMan.instance.IsExpectingInputNow(KarateMan.InputAction_Press)) { - Punch(1, PlayerInput.CurrentControlStyle == InputController.ControlStyles.Touch); + Punch(_lastPunchedHeavy ? 2 : 1, PlayerInput.CurrentControlStyle == InputController.ControlStyles.Touch, _lastPunchedHeavy); SoundByte.PlayOneShotGame("karateman/swingNoHit", forcePlay: true); } } @@ -215,7 +215,9 @@ namespace HeavenStudio.Games.Scripts_KarateMan lastChargeTime = double.MinValue; } - public bool Punch(int forceHand = 0, bool touchCharge = false) + private bool _lastPunchedHeavy = false; + + public bool Punch(int forceHand = 0, bool touchCharge = false, bool punchedHeavy = false) { if (GameManager.instance.currentGame != "karateman") return false; var cond = Conductor.instance; @@ -225,6 +227,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan unPrepareTime = double.MinValue; lastChargeTime = double.MinValue; inKick = false; + _lastPunchedHeavy = punchedHeavy; switch (forceHand) { diff --git a/Assets/Scripts/Games/KarateMan/KarateManPot.cs b/Assets/Scripts/Games/KarateMan/KarateManPot.cs index b1d283fbf..f79ddf7a5 100644 --- a/Assets/Scripts/Games/KarateMan/KarateManPot.cs +++ b/Assets/Scripts/Games/KarateMan/KarateManPot.cs @@ -760,7 +760,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan var joe = KarateMan.instance.Joe; if (state <= -1f || state >= 1f) { - bool straight = joe.Punch(ItemPunchHand()); + bool straight = joe.Punch(ItemPunchHand(), false, ItemPunchHand() == 2); startBeat = Conductor.instance.songPositionInBeatsAsDouble; CurrentCurve = ItemCurves[6]; curveTargetBeat = 1f; @@ -793,7 +793,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan return; } } - bool straight = joe.Punch(ItemPunchHand()); + bool straight = joe.Punch(ItemPunchHand(), false, ItemPunchHand() == 2); DoHitExpression(startBeat + 1f); ItemHitEffect(straight); status = FlyStatus.Hit;