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

public class CanvasManager : MonoBehaviour
{
    [SerializeField] GameObject JekyllCanvas;
    [SerializeField] GameObject HydeCanvas;

    private void Start()
    {
        CanvasChange(Transformation.Jekyll);
    }

    private void OnEnable()
    {
        EventManager.Instance.onTransformation += CanvasChange;
    }

    private void OnDisable()
    {
        EventManager.Instance.onTransformation -= CanvasChange;
    }

    private void CanvasChange(Transformation form)
    {
        JekyllCanvas.SetActive(form == Transformation.Jekyll);
        HydeCanvas.SetActive(form == Transformation.Hyde);
    }
}
