NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UI_CampController.cs

68 lines
1.5 KiB
C#
Raw Normal View History

2024-01-12 14:38:11 +08:00
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.UIElements;
using Button = UnityEngine.UI.Button;
using Image = UnityEngine.UI.Image;
using Toggle = UnityEngine.UI.Toggle;
using ScrollView = PhxhSDK.PhxhScrollView;
using Framework;
public class UI_CampController : UIWindow
{
//UI GameObj
///Auto Gen Start///
public Button Button_Back;
public Button Button_back;
public TMP_Text Text_Back;
public Button Button_Home;
2024-03-06 17:36:51 +08:00
/// <summary>
/// 技能树按钮
/// </summary>
private Button buttonSkill;
2024-01-12 14:38:11 +08:00
///Auto Gen End///
2024-01-23 12:25:47 +08:00
public override void OnInit()
2024-01-12 14:38:11 +08:00
{
//bind UI GameObj
UI_CampBinder.GetComponents(this);
2024-03-06 17:36:51 +08:00
buttonSkill = GetComponent<Button>("Button_Skill");
2024-01-12 14:38:11 +08:00
BindButton(Button_back, OnClickBack);
BindButton(Button_Home, OnClickBack);
2024-03-06 17:36:51 +08:00
BindButton(buttonSkill, OnSkill);
2024-01-12 14:38:11 +08:00
}
private void OnClickBack()
{
CampManager.Instance.ExitCamp();
}
//invoke when open window
protected override void OnShowWindow(object data = null)
2024-01-12 14:38:11 +08:00
{
}
//invoke when reload window
protected override void OnReloadWindow(object data = null)
{
}
//invoke when close window
protected override void OnHideWindow()
2024-01-12 14:38:11 +08:00
{
}
2024-03-06 17:36:51 +08:00
/// <summary>
/// 技能养成
/// </summary>
private async void OnSkill()
{
await UI_CommandSkillCultivateController.Open();
}
2024-01-12 14:38:11 +08:00
}