diff options
author | chai <chaifix@163.com> | 2021-08-29 19:44:31 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-08-29 19:44:31 +0800 |
commit | cf4e1f9833c810e18429ddf40f4bcf9052ff17ac (patch) | |
tree | 2cfae8edc3966b084baabfd5366c1c928a113c29 /Assets/Scripts/Input/InputManager.cs | |
parent | d88698a454fbfe306bd0142660172bdd6e93ecf3 (diff) |
*monster
Diffstat (limited to 'Assets/Scripts/Input/InputManager.cs')
-rw-r--r-- | Assets/Scripts/Input/InputManager.cs | 33 |
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)
|