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

namespace mgaia.Utils
{
    /// <summary>
    /// Classe abstrata de behaviour utilizado para os menus
    /// </summary>
    /// <owner>Victor</owner>
    public abstract class BaseMenuBehaviour : MonoBehaviour
    {
        public bool IsModal;
        public int Priority = 0;

        public virtual void OnShowMenu(params object[] parameters) { }

        public virtual void OnRemoveMenu() { }

        protected virtual void OnEscapePressed() { }

        /// <summary>
        /// Método de atualização do menu
        /// </summary>
        public virtual void UpdateRespectingModal()
        {
            if (Input.GetKeyUp(KeyCode.Escape))
            {
                OnEscapePressed();
            }
        }
    }
}