Files
tcg-client/Assets/TcgEngine/Scripts/Menu/AdventurePanel.cs
yaoyanwei 2f2a601227 init
2025-08-04 16:45:48 +08:00

47 lines
973 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TcgEngine.Client;
namespace TcgEngine.UI
{
public class AdventurePanel : UIPanel
{
private List<LevelUI> level_uis = new List<LevelUI>();
private static AdventurePanel instance;
protected override void Awake()
{
base.Awake();
instance = this;
}
protected override void Start()
{
base.Start();
level_uis.AddRange(GetComponentsInChildren<LevelUI>());
}
private void RefreshLevels()
{
foreach (LevelUI level in level_uis)
{
level.RefreshLevel();
}
}
public override void Show(bool instant = false)
{
base.Show(instant);
RefreshLevels();
}
public static AdventurePanel Get()
{
return instance;
}
}
}