using asap.core; namespace EventMowForTreasure { public class EventMowForTreasureInfoPanel : BasePanel { private EventMowForTreasure_CollectionCell[] _collectionCells; private void Awake() { _collectionCells = gameObject.GetComponentsInChildren(); } protected override void Start() { EventMowForTreasureManager manager = GContext.container.Resolve(); 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()?.TryShowGuide(); } } }