karate man right hand thing

This commit is contained in:
Rapandrasmus 2023-12-10 19:09:16 +01:00
parent cdc90d970a
commit 2b8e558aa6
2 changed files with 7 additions and 4 deletions

View file

@ -141,7 +141,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
{ {
if (!KarateMan.instance.IsExpectingInputNow(KarateMan.InputAction_Press)) 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); SoundByte.PlayOneShotGame("karateman/swingNoHit", forcePlay: true);
} }
} }
@ -215,7 +215,9 @@ namespace HeavenStudio.Games.Scripts_KarateMan
lastChargeTime = double.MinValue; 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; if (GameManager.instance.currentGame != "karateman") return false;
var cond = Conductor.instance; var cond = Conductor.instance;
@ -225,6 +227,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
unPrepareTime = double.MinValue; unPrepareTime = double.MinValue;
lastChargeTime = double.MinValue; lastChargeTime = double.MinValue;
inKick = false; inKick = false;
_lastPunchedHeavy = punchedHeavy;
switch (forceHand) switch (forceHand)
{ {

View file

@ -760,7 +760,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
var joe = KarateMan.instance.Joe; var joe = KarateMan.instance.Joe;
if (state <= -1f || state >= 1f) if (state <= -1f || state >= 1f)
{ {
bool straight = joe.Punch(ItemPunchHand()); bool straight = joe.Punch(ItemPunchHand(), false, ItemPunchHand() == 2);
startBeat = Conductor.instance.songPositionInBeatsAsDouble; startBeat = Conductor.instance.songPositionInBeatsAsDouble;
CurrentCurve = ItemCurves[6]; CurrentCurve = ItemCurves[6];
curveTargetBeat = 1f; curveTargetBeat = 1f;
@ -793,7 +793,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
return; return;
} }
} }
bool straight = joe.Punch(ItemPunchHand()); bool straight = joe.Punch(ItemPunchHand(), false, ItemPunchHand() == 2);
DoHitExpression(startBeat + 1f); DoHitExpression(startBeat + 1f);
ItemHitEffect(straight); ItemHitEffect(straight);
status = FlyStatus.Hit; status = FlyStatus.Hit;