From ce73a13f28e5a947df8f1f87f1f1be20010952ec Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 2 Aug 2021 08:35:26 +0800 Subject: =?UTF-8?q?*=20=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Test 1/TestInput.cs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Assets/Scripts/Test 1/TestInput.cs (limited to 'Assets/Scripts/Test 1/TestInput.cs') diff --git a/Assets/Scripts/Test 1/TestInput.cs b/Assets/Scripts/Test 1/TestInput.cs new file mode 100644 index 00000000..ed526f0d --- /dev/null +++ b/Assets/Scripts/Test 1/TestInput.cs @@ -0,0 +1,28 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class TestInput : MonoBehaviour +{ + + private void Update() + { + if(Input.GetKeyDown("j")) + { + InputManager.Instance.OnAttack(); + } + if(Input.GetKeyDown("space")) + { + InputManager.Instance.OnJump(); + } + if(Input.GetKeyDown("d")) + { + InputManager.Instance.OnMoveRight(); + } + if(Input.GetKeyDown("a")) + { + InputManager.Instance.OnMoveLeft(); + } + } + +} -- cgit v1.1-26-g67d0