| 12345678910111213141516171819202122232425262728293031323334353637 | using System;using Excel2Json;using Fort23.UTool;using UnityEngine;namespace Fort23.Mono{    public class BigMapItem    {        public GameObjectPool gameObjectPool;        public WorldMapConfig worldMapConfig;        private ReferenceCollector referenceCollector;        public async void CustomInit(int worldMapId, GameObjectPool gameObjectPool, Action<ItemWidgetBasic> callBack)        {            this.gameObjectPool = gameObjectPool;            worldMapConfig = ConfigComponent.Instance.Get<WorldMapConfig>(worldMapId);            referenceCollector = gameObjectPool.own.GetComponent<ReferenceCollector>();            for (var i = 0; i < worldMapConfig.bigMapId.Length; i++)            {                GameObject gam = referenceCollector.Get<GameObject>("map_" + worldMapConfig.bigMapId[i]);                BigMapWidget bigMapWidget = await UIManager.Instance.CreateGComponentForObject<BigMapWidget>(gam, null);                bigMapWidget.OnClick = callBack;                bigMapWidget.CustomInit(worldMapConfig.bigMapId[i]);            }        }        public void Dispose()        {            UIManager.Instance.DormancyGComponent(gameObjectPool);            gameObjectPool = null;            referenceCollector = null;        }    }}
 |