| | |
| | | private BattleField battleField; |
| | | private List<DamageContent> damageContentList = new List<DamageContent>(); |
| | | |
| | | private bool isPoolReady = false; |
| | | |
| | | protected override void InitComponent() |
| | | { |
| | | base.InitComponent(); |
| | |
| | | EventBroadcast.Instance.RemoveListener<string, JsonData>(EventName.BATTLE_END, OnBattleEnd); |
| | | } |
| | | |
| | | private void InitializePools() |
| | | { |
| | | #pragma warning disable CS0618 // Obsolete — sync legacy fallback, use InitializePoolsAsync |
| | | damagePrefabPool = GameObjectPoolManager.Instance.GetPool(UILoader.LoadPrefab("DamageContent")); |
| | | #pragma warning restore CS0618 |
| | | } |
| | | |
| | | private async UniTask InitializePoolsAsync() |
| | | private async void InitializePools() |
| | | { |
| | | damagePrefabPool = GameObjectPoolManager.Instance.GetPool(await UILoader.LoadPrefabAsync("DamageContent")); |
| | | if (this == null) return; |
| | | } |
| | | |
| | | |
| | | public void SetBattleField(BattleField _battleField) |
| | | { |
| | | CleanupBattleField(); |