using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class FailPanel : BasePanel { public Button ReturnBtn; public GameObject moveObject; public static FailPanel instance; public GameObject bg; public override void Start() { instance = this; base.Start(); ReturnBtn.onClick.AddListener(OnClickReBtn); } public void OnClickReBtn() { moveObject.GetComponent().ReturnStartPos(); HidePanel(); } public override void HidePanel() { base.HidePanel(); PlayerMovePos.instance.IsReturn = true; //BossContro.instance.ReturnParent(); MaskContro.instance.SetMask(false); //都返回原来的位置 } public override void ShowPanel() { base.ShowPanel(); foreach (GameObject item in bg.GetComponent().bossobj) { item.GetComponent().ReturnParent(); } //dic[room_id].GetComponent().ReturnParent(); } }