using FairyGUI;
using UI.Launcher;
using UnityEngine;
namespace GFGGame
{
    public class HealthAdviceView : MonoBehaviour
    {
        private static GameObject _ui;
        /// 
        /// 打开界面
        /// 
        public static void Open()
        {
            var go = Resources.Load("UUI/Launcher/UIHealthAdvice");
            _ui = GameObject.Instantiate(go);
        }
        /// 
        /// 关闭界面
        /// 
        /// 
        public static void Close()
        {
            GameObject.DestroyImmediate(_ui);
            _ui = null;
            //检测开启pad遮挡
            float maxAspectRatio = 1080 * 1.0f / 1920;
            if (Screen.width * 1.0f / Screen.height > maxAspectRatio)
                PadMaskView.Open();
        }
    }
}