loudixvmuniu/Assets/_Scripts/Application/UI/ExplainContainPanel.cs

51 lines
1.4 KiB
C#
Raw Normal View History

2025-01-02 12:15:45 +08:00
using CG.Framework;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
/*******************************************************************************
*Create By CG
*Function
*******************************************************************************/
namespace ZXK.LouDiXvMuNiu
{
public class ExplainContainPanel : UIBase
{
private Toggle _trainTog = null;
private Toggle _handlerTog = null;
private GameObject _trainGeo = null;
private GameObject _handlerGeo = null;
private Button _closeBtn = null;
protected override void Awake()
{
base.Awake();
_trainTog = GetWedage("TrainingInstruction_N").GetComponent<Toggle>();
_handlerTog = GetWedage("OperationInstruction_N").GetComponent<Toggle>();
_trainGeo = GetWedage("TrainExplainBG_N");
_handlerGeo = GetWedage("HandlerExplainBG_N");
_closeBtn = GetWedage("CloseBtn_N").GetComponent<Button>();
InitUIState();
CG.UTility.PopUpMng._TriAble = false;
}
private void InitUIState()
{
_trainTog.onValueChanged.AddListener((isOn) =>
{
_trainGeo.SetActive(isOn);
});
_handlerTog.onValueChanged.AddListener((isOn) =>
{
_handlerGeo.SetActive(isOn);
});
_closeBtn.onClick.AddListener(() =>
{
UI_Manage.Instance.ClosePanel("ExplainContainPanel");
CG.UTility.PopUpMng._TriAble = true;
});
_trainTog.isOn = true;
_handlerTog.isOn = false;
}
}
}