using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.InputSystem; /// /// 输入 - 控制 /// [RequireComponent(typeof(PlayerInput))] public abstract class InputControl : MonoBehaviour { protected virtual void Awake() { ModuleInput.OnInputMode += ModuleInput_OnInputMode; } protected virtual void OnDestroy() { ModuleInput.OnInputMode -= ModuleInput_OnInputMode; } /// 输入模式 protected abstract void ModuleInput_OnInputMode(InputMode mode); }