YiHe_AllVersion/YHWeb/Assets/YHElectric/Scripts/UIPanel/PanoramicEnergyPanel.cs

42 lines
1.2 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using XFrame.Core.UI;
using XFrame.Core.Tool;
using UnityEngine.EventSystems;
using DG.Tweening;
using System;
namespace YHElectric
{
public class PanoramicEnergyPanel : XUIPanel
{
public static bool Actived = false;
public PanoramicEnergy panoramic;
public PanoramicEnergyPanel() : base(UIType.PopUp, UIMode.None, UICollider.None)
{
uiPath = "UI/UIPanelPrefab/PanoramicEnergyPanel(Clone)";
}
public override void Awake(GameObject go)
{
transform.Find("closeBtn").GetComponent<Button>().onClick.AddListener(() => { Hide(); Camera.main.GetComponent<Animator>().enabled = false; });
}
public override void Active()
{
base.Active();
Actived = true;
Debug.Log("打开全景能源页面");
panoramic = transform.GetComponent<PanoramicEnergy>();
//panoramic.StopAnim("111");
}
public override void Hide()
{
Actived = false;
base.Hide();
ClosePanel<MaskPanel>();
}
}
}