summaryrefslogtreecommitdiff
path: root/Assets/Scripts
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts')
-rw-r--r--Assets/Scripts/Input/InputManager.cs3
-rw-r--r--Assets/Scripts/Unit/Component/UnitState.cs24
2 files changed, 25 insertions, 2 deletions
diff --git a/Assets/Scripts/Input/InputManager.cs b/Assets/Scripts/Input/InputManager.cs
index 62fd5f91..72f5cba2 100644
--- a/Assets/Scripts/Input/InputManager.cs
+++ b/Assets/Scripts/Input/InputManager.cs
@@ -108,7 +108,8 @@ public class InputManager : SingletonMB<InputManager>
return false;
}
}
- m_CommandQueue.RemoveRange(count - keys.Length, keys.Length);
+ //m_CommandQueue.RemoveRange(count - keys.Length, keys.Length);
+ m_CommandQueue.Clear();
return true;
}
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;
}
}