Global Game Jam 2021
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

27 lines
591 B

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);
}