using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using InControl;

public class UIInputManager : MonoBehaviour
{
    private UIActions _actions;

    void OnEnable()
    {
        _actions = new UIActions();

        InControlInputModule inputModule = GetComponent<InControlInputModule>();

        if (inputModule != null)
        {
            inputModule.SubmitAction = _actions.Select;
            inputModule.CancelAction = _actions.Back;
            inputModule.MoveAction = _actions.Move;
        }
    }

    void OnDisable()
    {
        DestroyActions();
    }


    void DestroyActions()
    {
        _actions.Destroy();
    }
}