using UnityEngine; using UnityEngine.InputSystem; public class PlayerController : MonoBehaviour { private InputAction moveAction; private void Awake() { // 获取InputAction moveAction = new InputAction("Move", binding: "<Keyboard>/w><Keyboard>/s>"); moveAc...
private IRotate m_RotateSystem; private void Awake() { /// // Below are 3 ways to resolve the dependency. /// /* Just create a new instance (if a class doesn't inherit from MonoBehaviour) and pass the 'Cube' class instance through the constructor: */ m_RotateSystem = new Rotate(t...