|
|
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.InputSystem;
-
- public abstract class InputBehaviour : MonoBehaviour
- {
-
- protected PlayerData m_data;
-
- public virtual void Initialise(PlayerData data)
- {
- this.m_data = data;
- RegisterInput(data.Input);
- }
-
- protected virtual void OnDestroy()
- {
- if (m_data != null)
- UnregisterInput(m_data.Input);
- }
-
-
- public abstract void RegisterInput(PlayerInput playerInput);
-
- public abstract void UnregisterInput(PlayerInput playerInput);
- }
|