diff options
| author | chai <chaifix@163.com> | 2021-08-02 08:35:26 +0800 | 
|---|---|---|
| committer | chai <chaifix@163.com> | 2021-08-02 08:35:26 +0800 | 
| commit | ce73a13f28e5a947df8f1f87f1f1be20010952ec (patch) | |
| tree | 2c430bcd93f2c09bd35340def7c556c7294d6b5d /Assets/Scripts/Test 1/TestInput.cs | |
| parent | 81acfeb9a1d88075899d9c21064330915caa59a4 (diff) | |
* 测试
Diffstat (limited to 'Assets/Scripts/Test 1/TestInput.cs')
| -rw-r--r-- | Assets/Scripts/Test 1/TestInput.cs | 28 | 
1 files changed, 28 insertions, 0 deletions
| 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(); +		} +	} + +} | 
