summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Input
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/Input')
-rw-r--r--Assets/Scripts/Input/InputManager.cs33
1 files changed, 2 insertions, 31 deletions
diff --git a/Assets/Scripts/Input/InputManager.cs b/Assets/Scripts/Input/InputManager.cs
index 72f5cba2..838409b5 100644
--- a/Assets/Scripts/Input/InputManager.cs
+++ b/Assets/Scripts/Input/InputManager.cs
@@ -28,37 +28,6 @@ public class InputManager : SingletonMB<InputManager>
}
}
- public void OnMoveRight()
- {
- UnitState.MoveParam move = new UnitState.MoveParam();
- move.isRight = true;
- move.key = "d";
- pc.unitState.ChangeState(UnitState.EUnitState.Move, move);
- }
-
- public void OnMoveLeft()
- {
- UnitState.MoveParam move = new UnitState.MoveParam();
- move.isRight = false;
- move.key = "a";
- pc.unitState.ChangeState(UnitState.EUnitState.Move, move);
- }
-
- public void OnTurnBack()
- {
-
- }
-
- public void OnJump()
- {
- pc.unitState.ChangeState(UnitState.EUnitState.Jump, new UnitState.JumpParam());
- }
-
- public void OnAttack()
- {
- pc.unitState.ChangeState(UnitState.EUnitState.Attack, new UnitState.SkillParam());
- }
-
public void OnUpdate()
{
foreach (KeyCode vKey in System.Enum.GetValues(typeof(KeyCode)))
@@ -91,6 +60,8 @@ public class InputManager : SingletonMB<InputManager>
{
if (keys.Length > m_CommandQueue.Count)
return false;
+ if (!Input.GetKey(keys[keys.Length - 1]))
+ return false;
int count = m_CommandQueue.Count;
float preTime = m_CommandQueue[count - keys.Length].time;
for (int i = 0; i < keys.Length; ++i)