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

public abstract class UIBaseScreen : MonoBehaviour
{
    public void Open()
    {
        gameObject.SetActive(true);
    }

    public void Close()
    {
        gameObject.SetActive(false);
    }

    private void Awake()
    {
        CenterScreenInCanvas();
        OnAwake();
    }

    protected abstract void OnAwake();

    void CenterScreenInCanvas()
    {
        GetComponent<RectTransform>().anchoredPosition = Vector2.zero;
    }
}
