SetGamePanel.cs 745 Bytes
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class SetGamePanel : MonoBehaviour
{
    static public SetGamePanel Instance;
    private Animator m_animator;
    private Image m_image;

    public GameObject backPanel;

    private void Awake()
    {
        Instance = this;
    }

    private void Start()
    {
        m_image = GetComponent<Image>();
        m_animator = GetComponent<Animator>();
        m_animator.SetTrigger("Play");
    }


    public void SetPanelOn()
    {
        backPanel.SetActive(true);
    }
    public void SetPanelOff()
    {
        m_image = null;
        backPanel.SetActive(false);
        MiniGameManager.gameState = GameState.Play;
    }
}