From cf4e1f9833c810e18429ddf40f4bcf9052ff17ac Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 29 Aug 2021 19:44:31 +0800 Subject: *monster --- Assets/Scripts/Input/InputManager.cs | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) (limited to 'Assets/Scripts/Input/InputManager.cs') 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 } } - 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 { 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) -- cgit v1.1-26-g67d0