karate man touch
This commit is contained in:
parent
cc4a03813b
commit
8d71c887b2
|
|
@ -52,6 +52,32 @@ AnimatorState:
|
|||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &-8598915556387655082
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: ManChargeOut
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: b899e6821b3f03d4cad54ce868231eda, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &-7840309356215755865
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
|
|
@ -88,7 +114,8 @@ AnimatorState:
|
|||
m_Name: ManCharge
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_Transitions:
|
||||
- {fileID: -6495875897269842745}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
|
|
@ -104,6 +131,28 @@ AnimatorState:
|
|||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &-6495875897269842745
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions: []
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 2153695472368412942}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &-3699598731561684078
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
|
|
@ -256,6 +305,32 @@ AnimatorController:
|
|||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1102 &2153695472368412942
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: ManReturn
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: b697eda1ad0bba3439844040d4dc6777, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1107 &3535355717301820939
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 6
|
||||
|
|
@ -304,6 +379,12 @@ AnimatorStateMachine:
|
|||
- serializedVersion: 1
|
||||
m_State: {fileID: -3699598731561684078}
|
||||
m_Position: {x: 620, y: 780, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 2153695472368412942}
|
||||
m_Position: {x: 550, y: 260, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -8598915556387655082}
|
||||
m_Position: {x: 585, y: 325, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b899e6821b3f03d4cad54ce868231eda
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
12129
Assets/Resources/Sprites/Games/KarateMan/anime/karateman/ManReturn.anim
Normal file
12129
Assets/Resources/Sprites/Games/KarateMan/anime/karateman/ManReturn.anim
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b697eda1ad0bba3439844040d4dc6777
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -4,6 +4,7 @@ using System.Collections.Generic;
|
|||
using UnityEngine;
|
||||
|
||||
using HeavenStudio.Util;
|
||||
using HeavenStudio.InputSystem;
|
||||
using Jukebox;
|
||||
|
||||
namespace HeavenStudio.Games.Loaders
|
||||
|
|
@ -441,6 +442,97 @@ namespace HeavenStudio.Games
|
|||
public static int WantNoriType = (int) NoriMode.None;
|
||||
public static double WantBgChangeStart = double.MinValue;
|
||||
public static float WantBgChangeLength = 0f;
|
||||
|
||||
const int IAAltDownCat = IAMAXCAT;
|
||||
const int IAAltUpCat = IAMAXCAT + 1;
|
||||
|
||||
protected static bool IA_PadAnyDown(out double dt)
|
||||
{
|
||||
return PlayerInput.GetPadDown(InputController.ActionsPad.East, out dt)
|
||||
|| PlayerInput.GetPadDown(InputController.ActionsPad.Up, out dt)
|
||||
|| PlayerInput.GetPadDown(InputController.ActionsPad.Down, out dt)
|
||||
|| PlayerInput.GetPadDown(InputController.ActionsPad.Left, out dt)
|
||||
|| PlayerInput.GetPadDown(InputController.ActionsPad.Right, out dt);
|
||||
}
|
||||
protected static bool IA_PadAnyUp(out double dt)
|
||||
{
|
||||
return PlayerInput.GetPadUp(InputController.ActionsPad.East, out dt)
|
||||
|| PlayerInput.GetPadUp(InputController.ActionsPad.Up, out dt)
|
||||
|| PlayerInput.GetPadUp(InputController.ActionsPad.Down, out dt)
|
||||
|| PlayerInput.GetPadUp(InputController.ActionsPad.Left, out dt)
|
||||
|| PlayerInput.GetPadUp(InputController.ActionsPad.Right, out dt);
|
||||
}
|
||||
protected static bool IA_PadAny(out double dt)
|
||||
{
|
||||
dt = 0;
|
||||
return PlayerInput.GetPad(InputController.ActionsPad.East)
|
||||
|| PlayerInput.GetPad(InputController.ActionsPad.Up)
|
||||
|| PlayerInput.GetPad(InputController.ActionsPad.Down)
|
||||
|| PlayerInput.GetPad(InputController.ActionsPad.Left)
|
||||
|| PlayerInput.GetPad(InputController.ActionsPad.Right);
|
||||
}
|
||||
protected static bool IA_TouchDown(out double dt)
|
||||
{
|
||||
return PlayerInput.GetTouchDown(InputController.ActionsTouch.Tap, out dt)
|
||||
&& !instance.IsExpectingInputNow(InputAction_AltDown);
|
||||
}
|
||||
protected static bool IA_TouchUp(out double dt)
|
||||
{
|
||||
return PlayerInput.GetTouchUp(InputController.ActionsTouch.Tap, out dt)
|
||||
&& !instance.IsExpectingInputNow(InputAction_AltDown);
|
||||
}
|
||||
|
||||
protected static bool IA_EmptyTouchUp(out double dt)
|
||||
{
|
||||
return PlayerInput.GetTouchUp(InputController.ActionsTouch.Tap, out dt) && !PlayerInput.GetFlick(out _);
|
||||
}
|
||||
|
||||
protected static bool IA_PadAltDown(out double dt)
|
||||
{
|
||||
return PlayerInput.GetPadDown(InputController.ActionsPad.South, out dt);
|
||||
}
|
||||
protected static bool IA_BatonAltDown(out double dt)
|
||||
{
|
||||
return PlayerInput.GetSqueezeDown(out dt);
|
||||
}
|
||||
protected static bool IA_TouchAltDown(out double dt)
|
||||
{
|
||||
return PlayerInput.GetTouchDown(InputController.ActionsTouch.Tap, out dt)
|
||||
&& instance.IsExpectingInputNow(InputAction_AltDown);
|
||||
}
|
||||
|
||||
protected static bool IA_PadAltUp(out double dt)
|
||||
{
|
||||
return PlayerInput.GetPadUp(InputController.ActionsPad.South, out dt);
|
||||
}
|
||||
protected static bool IA_BatonAltUp(out double dt)
|
||||
{
|
||||
return PlayerInput.GetSqueezeUp(out dt);
|
||||
}
|
||||
protected static bool IA_TouchAltUp(out double dt)
|
||||
{
|
||||
return PlayerInput.GetFlick(out dt)
|
||||
&& instance.IsExpectingInputNow(InputAction_AltUp);
|
||||
}
|
||||
|
||||
public static PlayerInput.InputAction InputAction_Press =
|
||||
new("KaratePress", new int[] { IAPressCat, IAPressCat, IAPressCat },
|
||||
IA_PadAnyDown, IA_TouchDown, IA_BatonBasicPress);
|
||||
public static PlayerInput.InputAction InputAction_Flick =
|
||||
new("KaratePress", new int[] { IAFlickCat, IAFlickCat, IAFlickCat },
|
||||
IA_PadAnyUp, IA_TouchFlick, IA_BatonBasicRelease);
|
||||
public static PlayerInput.InputAction InputAction_Pressing =
|
||||
new("KaratePress", new int[] { IAPressingCat, IAPressingCat, IAPressingCat },
|
||||
IA_PadAny, IA_TouchBasicPressing, IA_BatonBasicPressing);
|
||||
public static PlayerInput.InputAction InputAction_AltDown =
|
||||
new("KarateAltDown", new int[] { IAAltDownCat, IAAltDownCat, IAAltDownCat },
|
||||
IA_PadAltDown, IA_TouchAltDown, IA_BatonAltDown);
|
||||
public static PlayerInput.InputAction InputAction_AltUp =
|
||||
new("KarateAltUp", new int[] { IAAltUpCat, IAAltUpCat, IAAltUpCat },
|
||||
IA_PadAltUp, IA_TouchAltUp, IA_BatonAltUp);
|
||||
public static PlayerInput.InputAction InputAction_TouchUp =
|
||||
new("KarateAltUp", new int[] { IAEmptyCat, IAReleaseCat, IAEmptyCat },
|
||||
IA_PadAltUp, IA_EmptyTouchUp, IA_BatonAltUp);
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
using HeavenStudio;
|
||||
using HeavenStudio.Util;
|
||||
using HeavenStudio.InputSystem;
|
||||
|
||||
namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
{
|
||||
|
|
@ -35,7 +35,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
public int GetShouldComboId() { return shouldComboId; }
|
||||
|
||||
public bool wantKick = false;
|
||||
public bool inKick = false;
|
||||
public bool inKick = false, inTouchCharge = false;
|
||||
double lastChargeTime = double.MinValue;
|
||||
double unPrepareTime = double.MinValue;
|
||||
double noNuriJabTime = double.MinValue;
|
||||
|
|
@ -46,8 +46,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
{
|
||||
get
|
||||
{
|
||||
return inCombo || lockedInCombo ||
|
||||
Conductor.instance.GetPositionFromBeat(lastChargeTime, 2.75f) <= 0.25f || inNuriLock;
|
||||
return inCombo || lockedInCombo || inKick || inNuriLock || inTouchCharge;
|
||||
}
|
||||
}
|
||||
public bool inNuriLock { get { return (Conductor.instance.songPositionInBeatsAsDouble >= noNuriJabTime && Conductor.instance.songPositionInBeatsAsDouble < noNuriJabTime + 1f); } }
|
||||
|
|
@ -126,42 +125,59 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
|
||||
if (inKick)
|
||||
{
|
||||
float chargeProg = cond.GetPositionFromBeat(lastChargeTime, 2.75f);
|
||||
float chargeProg = cond.GetPositionFromBeat(lastChargeTime, 1.75f);
|
||||
if (chargeProg >= 0f && chargeProg < 1f)
|
||||
{
|
||||
anim.DoScaledAnimation("ManCharge", lastChargeTime, 2.75f);
|
||||
anim.DoScaledAnimation("ManCharge", lastChargeTime, 1.75f);
|
||||
bop.startBeat = lastChargeTime + 1.75f;
|
||||
}
|
||||
else if (chargeProg >= 1f)
|
||||
else if (cond.songPositionAsDouble >= lastChargeTime + 2.75f)
|
||||
{
|
||||
anim.speed = 1f;
|
||||
bop.startBeat = lastChargeTime + 1.75f;
|
||||
bop.startBeat = lastChargeTime + 2.75f;
|
||||
lastChargeTime = double.MinValue;
|
||||
inKick = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ((PlayerInput.Pressed() || PlayerInput.GetAnyDirectionDown()) && !inSpecial)
|
||||
if (PlayerInput.GetIsAction(KarateMan.InputAction_Press) && !inSpecial)
|
||||
{
|
||||
if (!KarateMan.instance.IsExpectingInputNow(InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN))
|
||||
if (!KarateMan.instance.IsExpectingInputNow(KarateMan.InputAction_Press))
|
||||
{
|
||||
Punch(1);
|
||||
Punch(1, PlayerInput.CurrentControlStyle == InputController.ControlStyles.Touch);
|
||||
SoundByte.PlayOneShotGame("karateman/swingNoHit", forcePlay: true);
|
||||
}
|
||||
}
|
||||
|
||||
if (PlayerInput.AltPressed() && KarateMan.IsComboEnable && !inSpecial)
|
||||
if (PlayerInput.GetIsAction(KarateMan.InputAction_TouchUp) && lastChargeTime != double.MinValue && !(inTouchCharge || inKick))
|
||||
{
|
||||
if (!KarateMan.instance.IsExpectingInputNow(InputType.STANDARD_ALT_DOWN))
|
||||
lastChargeTime = double.MinValue;
|
||||
}
|
||||
if (lastChargeTime != double.MinValue && cond.songPositionInBeatsAsDouble > lastChargeTime + 0.25 && PlayerInput.GetIsAction(KarateMan.InputAction_Pressing) && !(inKick || inTouchCharge))
|
||||
{
|
||||
if (PlayerInput.CurrentControlStyle == InputController.ControlStyles.Touch)
|
||||
{
|
||||
Debug.Log("Touch charge");
|
||||
inTouchCharge = true;
|
||||
anim.DoScaledAnimationAsync("ManChargeOut", 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
if (PlayerInput.GetIsAction(KarateMan.InputAction_AltDown) && KarateMan.IsComboEnable && !inSpecial)
|
||||
{
|
||||
if (!KarateMan.instance.IsExpectingInputNow(KarateMan.InputAction_AltDown))
|
||||
{
|
||||
//start a forced-fail combo sequence
|
||||
ForceFailCombo(cond.songPositionInBeatsAsDouble);
|
||||
KarateMan.instance.ScoreMiss(2);
|
||||
}
|
||||
}
|
||||
else if (PlayerInput.AltPressedUp())
|
||||
else if (PlayerInput.GetIsAction(KarateMan.InputAction_AltUp) || PlayerInput.GetIsAction(KarateMan.InputAction_TouchUp))
|
||||
{
|
||||
if (!KarateMan.instance.IsExpectingInputNow(InputType.STANDARD_ALT_UP))
|
||||
if (PlayerInput.GetIsAction(KarateMan.InputAction_TouchUp) && inComboId != -1 && !lockedInCombo)
|
||||
{
|
||||
inComboId = -1;
|
||||
}
|
||||
if (!KarateMan.instance.IsExpectingInputNow(KarateMan.InputAction_AltUp))
|
||||
{
|
||||
if (inComboId != -1 && !lockedInCombo)
|
||||
{
|
||||
|
|
@ -170,17 +186,26 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
}
|
||||
}
|
||||
|
||||
if ((!GameManager.instance.autoplay) && (PlayerInput.PressedUp() || PlayerInput.GetAnyDirectionUp()) && !(PlayerInput.Pressing() || PlayerInput.GetAnyDirection()))
|
||||
if ((!GameManager.instance.autoplay)
|
||||
&& (PlayerInput.GetIsAction(KarateMan.InputAction_Flick) || PlayerInput.GetIsAction(KarateMan.InputAction_BasicRelease))
|
||||
&& !PlayerInput.GetIsAction(KarateMan.InputAction_Pressing))
|
||||
{
|
||||
if (wantKick)
|
||||
{
|
||||
//stopped holding, don't charge
|
||||
wantKick = false;
|
||||
}
|
||||
else if (inKick && cond.GetPositionFromBeat(lastChargeTime, 2.75f) <= 0.5f && !KarateMan.instance.IsExpectingInputNow(InputType.STANDARD_UP | InputType.DIRECTION_UP))
|
||||
else if (inKick || inTouchCharge)
|
||||
{
|
||||
Kick(cond.songPositionInBeatsAsDouble);
|
||||
SoundByte.PlayOneShotGame("karateman/swingKick", forcePlay: true);
|
||||
if (PlayerInput.GetIsAction(KarateMan.InputAction_Flick) && !KarateMan.instance.IsExpectingInputNow(KarateMan.InputAction_Flick))
|
||||
{
|
||||
Kick(cond.songPositionInBeatsAsDouble);
|
||||
SoundByte.PlayOneShotGame("karateman/swingKick", forcePlay: true);
|
||||
}
|
||||
else if (PlayerInput.GetIsAction(KarateMan.InputAction_TouchUp))
|
||||
{
|
||||
Kick(cond.songPositionInBeatsAsDouble, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -193,7 +218,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
lastChargeTime = double.MinValue;
|
||||
}
|
||||
|
||||
public bool Punch(int forceHand = 0)
|
||||
public bool Punch(int forceHand = 0, bool touchCharge = false)
|
||||
{
|
||||
if (GameManager.instance.currentGame != "karateman") return false;
|
||||
var cond = Conductor.instance;
|
||||
|
|
@ -232,7 +257,15 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
noNuriJabTime = cond.songPositionInBeatsAsDouble;
|
||||
break;
|
||||
}
|
||||
bop.startBeat = cond.songPositionInBeatsAsDouble + 0.5f;
|
||||
if (touchCharge)
|
||||
{
|
||||
lastChargeTime = cond.songPositionInBeatsAsDouble;
|
||||
bop.startBeat = double.MaxValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
bop.startBeat = cond.songPositionInBeatsAsDouble + 0.5f;
|
||||
}
|
||||
return straight; //returns what hand was used to punch the object
|
||||
}
|
||||
|
||||
|
|
@ -317,17 +350,25 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
});
|
||||
}
|
||||
|
||||
public void Kick(double beat)
|
||||
public void Kick(double beat, bool oldReturn = false)
|
||||
{
|
||||
if (!inKick) return;
|
||||
if (!(inKick || inTouchCharge)) return;
|
||||
//play the kick animation and reset stance
|
||||
anim.speed = 1f;
|
||||
bop.startBeat = beat + 1f;
|
||||
unPrepareTime = double.MinValue;
|
||||
lastChargeTime = double.MinValue;
|
||||
inKick = false;
|
||||
inTouchCharge = false;
|
||||
|
||||
anim.DoScaledAnimationAsync("ManKick", 0.5f);
|
||||
if (oldReturn)
|
||||
{
|
||||
anim.DoScaledAnimationAsync("ManReturn", 0.5f);
|
||||
}
|
||||
else
|
||||
{
|
||||
anim.DoScaledAnimationAsync("ManKick", 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
public void MarkCanEmote()
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using UnityEngine;
|
|||
using NaughtyBezierCurves;
|
||||
|
||||
using HeavenStudio.Util;
|
||||
using HeavenStudio.InputSystem;
|
||||
|
||||
namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
{
|
||||
|
|
@ -186,8 +187,8 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
switch (type)
|
||||
{
|
||||
case ItemType.ComboPot1:
|
||||
OnHit = KarateMan.instance.ScheduleInput(startBeat, 1f, InputType.STANDARD_ALT_DOWN, ComboStartJustOrNg, ComboStartThrough, ComboStartOut, CanCombo);
|
||||
OnHitWrongAction = KarateMan.instance.ScheduleUserInput(startBeat, 1f, InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN, ComboStartWrongAction, ComboStartOut, ComboStartOut, CanHit);
|
||||
OnHit = KarateMan.instance.ScheduleInput(startBeat, 1f, KarateMan.InputAction_AltDown, ComboStartJustOrNg, ComboStartThrough, ComboStartOut, CanCombo);
|
||||
OnHitWrongAction = KarateMan.instance.ScheduleUserInput(startBeat, 1f, KarateMan.InputAction_Press, ComboStartWrongAction, ComboStartOut, ComboStartOut, CanHitWrong);
|
||||
path = 1;
|
||||
break;
|
||||
case ItemType.ComboPot2:
|
||||
|
|
@ -208,24 +209,24 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
BeatAction.New(this, new List<BeatAction.Action>() { new BeatAction.Action(startBeat + 1f, delegate { JoeComboSequence(); }) });
|
||||
break;
|
||||
case ItemType.ComboBarrel:
|
||||
OnHit = KarateMan.instance.ScheduleInput(startBeat, 1f, InputType.STANDARD_ALT_UP, ComboEndJustOrNg, ComboEndThrough, ComboEndOut, CanComboEnd);
|
||||
OnHit = KarateMan.instance.ScheduleInput(startBeat, 1f, KarateMan.InputAction_AltUp, ComboEndJustOrNg, ComboEndThrough, ComboEndOut, CanComboEnd);
|
||||
path = 5;
|
||||
break;
|
||||
case ItemType.KickBarrel:
|
||||
OnHit = KarateMan.instance.ScheduleInput(startBeat, 1f, InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN, KickChargeJustOrNg, ItemThrough, ItemOut, CanCombo);
|
||||
OnHitWrongAction = KarateMan.instance.ScheduleUserInput(startBeat, 1f, InputType.STANDARD_ALT_DOWN, ItemWrongAction, ItemOut, ItemOut, CanCombo);
|
||||
OnHit = KarateMan.instance.ScheduleInput(startBeat, 1f, KarateMan.InputAction_Press, KickChargeJustOrNg, ItemThrough, ItemOut, CanCombo);
|
||||
OnHitWrongAction = KarateMan.instance.ScheduleUserInput(startBeat, 1f, KarateMan.InputAction_AltDown, ItemWrongAction, ItemOut, ItemOut, CanComboWrong);
|
||||
path = 1;
|
||||
comboId = -1;
|
||||
break;
|
||||
case ItemType.KickBomb:
|
||||
OnHit = KarateMan.instance.ScheduleInput(startBeat, 0.75f, InputType.STANDARD_UP | InputType.DIRECTION_UP, KickJustOrNg, KickThrough, KickOut, CanKick);
|
||||
OnHit = KarateMan.instance.ScheduleInput(startBeat, 0.75f, KarateMan.InputAction_Flick, KickJustOrNg, KickThrough, KickOut, CanKick);
|
||||
CurrentCurve = ItemCurves[6];
|
||||
curveTargetBeat = 2 * 0.75f;
|
||||
path = 1;
|
||||
comboId = -1;
|
||||
break;
|
||||
case ItemType.KickBall:
|
||||
OnHit = KarateMan.instance.ScheduleInput(startBeat, 0.75f, InputType.STANDARD_UP | InputType.DIRECTION_UP, KickJustOrNg, KickThrough, KickOut, CanKick);
|
||||
OnHit = KarateMan.instance.ScheduleInput(startBeat, 0.75f, KarateMan.InputAction_Flick, KickJustOrNg, KickThrough, KickOut, CanKick);
|
||||
CurrentCurve = ItemCurves[6];
|
||||
curveTargetBeat = 2 * 0.75f;
|
||||
path = 1;
|
||||
|
|
@ -239,14 +240,14 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
comboId = -1;
|
||||
break;
|
||||
case ItemType.Bomb:
|
||||
OnHit = KarateMan.instance.ScheduleInput(startBeat, 1f, InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN, ItemJustOrNg, ItemThrough, ItemOut, CanHit);
|
||||
OnHitWrongAction = KarateMan.instance.ScheduleUserInput(startBeat, 1f, InputType.STANDARD_ALT_DOWN, ItemWrongAction, ItemOut, ItemOut, CanHit);
|
||||
OnHit = KarateMan.instance.ScheduleInput(startBeat, 1f, KarateMan.InputAction_Press, ItemJustOrNg, ItemThrough, ItemOut, CanHit);
|
||||
OnHitWrongAction = KarateMan.instance.ScheduleUserInput(startBeat, 1f, KarateMan.InputAction_AltDown, ItemWrongAction, ItemOut, ItemOut, CanHitWrong);
|
||||
path = 1;
|
||||
comboId = -1;
|
||||
break;
|
||||
default:
|
||||
OnHit = KarateMan.instance.ScheduleInput(startBeat, 1f, InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN, ItemJustOrNg, ItemThrough, ItemOut, CanHit);
|
||||
OnHitWrongAction = KarateMan.instance.ScheduleUserInput(startBeat, 1f, InputType.STANDARD_ALT_DOWN, ItemWrongAction, ItemOut, ItemOut, CanHit);
|
||||
OnHit = KarateMan.instance.ScheduleInput(startBeat, 1f, KarateMan.InputAction_Press, ItemJustOrNg, ItemThrough, ItemOut, CanHit);
|
||||
OnHitWrongAction = KarateMan.instance.ScheduleUserInput(startBeat, 1f, KarateMan.InputAction_AltDown, ItemWrongAction, ItemOut, ItemOut, CanHitWrong);
|
||||
path = 1;
|
||||
comboId = -1;
|
||||
break;
|
||||
|
|
@ -738,7 +739,14 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
public bool CanHit()
|
||||
{
|
||||
var joe = KarateMan.instance.Joe;
|
||||
return status == FlyStatus.Fly && !(joe.inCombo || joe.inNuriLock);
|
||||
return status == FlyStatus.Fly && !joe.inSpecial;
|
||||
}
|
||||
|
||||
public bool CanHitWrong()
|
||||
{
|
||||
if (PlayerInput.CurrentControlStyle == InputController.ControlStyles.Touch) return false;
|
||||
var joe = KarateMan.instance.Joe;
|
||||
return status == FlyStatus.Fly && !joe.inSpecial;
|
||||
}
|
||||
|
||||
public void ItemJustOrNg(PlayerActionEvent caller, float state)
|
||||
|
|
@ -841,13 +849,20 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
});
|
||||
KarateMan.instance.Nori.DoThrough();
|
||||
OnHit.CanHit(false);
|
||||
OnHitWrongAction.CanHit(false);
|
||||
if (OnHitWrongAction != null)
|
||||
OnHitWrongAction.CanHit(false);
|
||||
}
|
||||
|
||||
public bool CanCombo()
|
||||
{
|
||||
var joe = KarateMan.instance.Joe;
|
||||
return status == FlyStatus.Fly && !(joe.inKick || joe.wantKick || joe.inCombo || joe.inNuriLock);
|
||||
return status == FlyStatus.Fly && !(joe.inSpecial || joe.wantKick);
|
||||
}
|
||||
public bool CanComboWrong()
|
||||
{
|
||||
if (PlayerInput.CurrentControlStyle == InputController.ControlStyles.Touch) return false;
|
||||
var joe = KarateMan.instance.Joe;
|
||||
return status == FlyStatus.Fly && !(joe.inSpecial || joe.wantKick);
|
||||
}
|
||||
|
||||
public void ComboStartJustOrNg(PlayerActionEvent caller, float state)
|
||||
|
|
@ -894,7 +909,8 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
});
|
||||
KarateMan.instance.Nori.DoThrough();
|
||||
OnHit.CanHit(false);
|
||||
OnHitWrongAction.CanHit(false);
|
||||
if (OnHitWrongAction != null)
|
||||
OnHitWrongAction.CanHit(false);
|
||||
}
|
||||
|
||||
public void ComboStartWrongAction(PlayerActionEvent caller, float state)
|
||||
|
|
@ -1069,12 +1085,14 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
});
|
||||
KarateMan.instance.Nori.DoThrough();
|
||||
OnHit.CanHit(false);
|
||||
OnHitWrongAction.CanHit(false);
|
||||
if (OnHitWrongAction != null)
|
||||
OnHitWrongAction.CanHit(false);
|
||||
}
|
||||
|
||||
public bool CanKick()
|
||||
{
|
||||
var joe = KarateMan.instance.Joe;
|
||||
Debug.Log(joe.inKick);
|
||||
return status == FlyStatus.Fly && joe.inKick;
|
||||
}
|
||||
|
||||
|
|
@ -1082,6 +1100,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
{
|
||||
if (GameManager.instance.currentGame != "karateman") return;
|
||||
var joe = KarateMan.instance.Joe;
|
||||
Debug.Log("KickJustOrNg");
|
||||
|
||||
joe.Kick(Conductor.instance.songPositionInBeatsAsDouble);
|
||||
if (state <= -1f || state >= 1f)
|
||||
|
|
|
|||
Loading…
Reference in a new issue