Files
ft/Client/Assets/Scripts/EventMowForTreasure/UIPanel/EventMowForTreasureInfoPanel.cs
2026-06-29 21:18:33 +08:00

31 lines
989 B
C#

using asap.core;
namespace EventMowForTreasure
{
public class EventMowForTreasureInfoPanel : BasePanel
{
private EventMowForTreasure_CollectionCell[] _collectionCells;
private void Awake()
{
_collectionCells = gameObject.GetComponentsInChildren<EventMowForTreasure_CollectionCell>();
}
protected override void Start()
{
EventMowForTreasureManager manager = GContext.container.Resolve<EventMowForTreasureManager>();
for (var i = 0; i < _collectionCells.Length; i++)
{
var collectionCell = _collectionCells[i];
var data=manager.GetCollectionDataAndRewardByIndex(i,out var rewards);
collectionCell?.SetData(data,rewards);
}
}
protected override void OnDestroy()
{
base.OnDestroy();
GContext.container.Resolve<EventMowForTreasureManager>()?.TryShowGuide();
}
}
}