using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class UIManager : MonoBehaviour
{
public static UIManager instance;
private bool isPauseMenu;
private GameObject PauseMenu;
private voidAwake(){if(instance == null){
instance = this;DontDestroyOnLoad(gameObject);}else{Destroy(gameObject);}
PauseMenu = gameObject;}
private voidStart(){ablePauseMenu();//初始化PauseMenu为禁用,使能实例化PauseMenu}
public staticvoidablePauseMenu(){
instance.PauseMenu.SetActive(!instance.PauseMenu.activeSelf);}}