summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Unit
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/Unit')
-rw-r--r--Assets/Scripts/Unit/Component/UnitState.cs24
1 files changed, 23 insertions, 1 deletions
diff --git a/Assets/Scripts/Unit/Component/UnitState.cs b/Assets/Scripts/Unit/Component/UnitState.cs
index bc934f43..1de97901 100644
--- a/Assets/Scripts/Unit/Component/UnitState.cs
+++ b/Assets/Scripts/Unit/Component/UnitState.cs
@@ -342,6 +342,16 @@ public class UnitState : UnitComponent
yield return new WaitForTransitionDone(unitAnimation);
while (true)
{
+ if (InputManager.Instance.TryCommand(0.5f, KeyCode.A, KeyCode.A))
+ {
+ TurnLeft();
+ ChangeState(EUnitState.AirDash, new AirDashParam());
+ }
+ if (InputManager.Instance.TryCommand(0.5f, KeyCode.D, KeyCode.D))
+ {
+ TurnRight();
+ ChangeState(EUnitState.AirDash, new AirDashParam());
+ }
if (unitAnimation.layers[0].playbackNomralizedTime >= 1)
ChangeState(EUnitState.Idle, new IdleParam());
bool canAttack = m_Owner.unitAnimation.layers[0].IsToggleOpen(EAnimationToogle.Combo);
@@ -398,7 +408,19 @@ public class UnitState : UnitComponent
m_Owner.transform.position = pos;
ChangeState(EUnitState.Idle, new IdleParam());
}
- yield return null;
+
+ if (InputManager.Instance.TryCommand(0.5f, KeyCode.A, KeyCode.A))
+ {
+ TurnLeft();
+ ChangeState(EUnitState.AirDash, new AirDashParam());
+ }
+ if (InputManager.Instance.TryCommand(0.5f, KeyCode.D, KeyCode.D))
+ {
+ TurnRight();
+ ChangeState(EUnitState.AirDash, new AirDashParam());
+ }
+
+ yield return null;
}
}