123456789101112131415161718192021222324252627 |
- 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)
- {
- 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.CustomInit(worldMapConfig.bigMapId[i]);
- }
- }
- }
- }
|