31 lines
636 B
C#
31 lines
636 B
C#
using Managers;
|
|
using UnityEngine;
|
|
using UnityEngine.InputSystem;
|
|
using static InputActionMaps;
|
|
|
|
public class GameplayMetaInputEvents : MonoBehaviour, IMetaActions
|
|
{
|
|
private InputActionMaps inputActions;
|
|
|
|
void Awake()
|
|
{
|
|
inputActions = new InputActionMaps();
|
|
inputActions.Meta.SetCallbacks(this);
|
|
inputActions.Meta.Enable();
|
|
}
|
|
public void OnStart(InputAction.CallbackContext context)
|
|
{
|
|
MatchManager.G.StartPressed();
|
|
}
|
|
|
|
public void OnPause(InputAction.CallbackContext context)
|
|
{
|
|
MatchManager.G.PausePressed();
|
|
}
|
|
public void Dispose()
|
|
{
|
|
inputActions.Meta.Disable();
|
|
inputActions.Meta.RemoveCallbacks(this);
|
|
}
|
|
}
|