diff options
Diffstat (limited to 'Assets/Scripts/Unit/Components/UnitState/PCState.cs')
-rw-r--r-- | Assets/Scripts/Unit/Components/UnitState/PCState.cs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Assets/Scripts/Unit/Components/UnitState/PCState.cs b/Assets/Scripts/Unit/Components/UnitState/PCState.cs index b8512d64..c332dcda 100644 --- a/Assets/Scripts/Unit/Components/UnitState/PCState.cs +++ b/Assets/Scripts/Unit/Components/UnitState/PCState.cs @@ -278,12 +278,14 @@ public class PCState : UnitState {
m_Owner.pcAnimation.AnimAttackToAir(param.offset);
yield return null; + InputManager.Instance.ClearCommand(); while (true)
{
bool canCombo = m_Owner.pcAnimation.baseLayer.IsToggleOpen(EAnimationToogle.Combo);
if(canCombo)
{
- if(Input.GetKeyDown("j"))
+ //if(Input.GetKeyDown("j"))
+ if(InputManager.Instance.TryCommand(0.5f, false, KeyCode.J))
{
ChangeState(EUnitState.AirAttack, new SkillParam());
}
@@ -308,10 +310,11 @@ public class PCState : UnitState IEnumerator AirAttack(SkillParam param) { - int total = 5;
+ int total = 5;
int id = 0;
m_Owner.pcAnimation.AnimAirAttack(id++); yield return null; // 等待animator更新 + InputManager.Instance.ClearCommand(); while (true) { bool canCombo = m_Owner.pcAnimation.baseLayer.IsToggleOpen(EAnimationToogle.Combo); @@ -328,7 +331,7 @@ public class PCState : UnitState ChangeState(EUnitState.AirDash, new AirDashParam()); } - if (Input.GetKeyDown("j")) + if (InputManager.Instance.TryCommand(0.3f, false, KeyCode.J)) { if (Input.GetKey("a")) { @@ -477,6 +480,10 @@ public class PCState : UnitState TurnAround(true); pos.x += vz * Time.deltaTime; } + if(Input.GetKeyDown("j"))
+ {
+ ChangeState(EUnitState.AirAttack, new SkillParam());
+ } m_Owner.transform.position = pos; if (pos.y > 0 && pos.y <= 1 && !landingGround) { |