private void CreateTip(UIBattleTipInfo info)
        {
            int maxSortingOrder = 0;

            foreach (UIBattleTip uiBattleTip in UIBattleTipList)
            {
                if (uiBattleTip.SortingOrder > maxSortingOrder)
                {
                    maxSortingOrder = uiBattleTip.SortingOrder;
                }
            }

            BattleTipPrefabType btType = BattleTipPrefabType.SelfAttack;

            if (info.AttackerType == AttackerType.LocalPlayer)
            {
                if (info.BattleTipType == BattleTipType.CriticalAttack)
                {
                    btType = BattleTipPrefabType.SelfCriticalAttack;
                }
                else if (info.BattleTipType == BattleTipType.Attack)
                {
                    btType = BattleTipPrefabType.SelfAttack;
                }
            }
            else if (info.AttackerType == AttackerType.LocalPlayerSelfDamage)
            {
                if (info.BattleTipType == BattleTipType.Attack)
                {
                    btType = BattleTipPrefabType.SelfDamage;
                }
            }

            UIBattleTip tip = GameObjectPoolManager.Instance.BattleUIDict[btType].AllocateGameObject <UIBattleTip>(UIManager.Instance.UI3DRoot);

            tip.Initialize(info, maxSortingOrder + 1);
            UIBattleTipList.Add(tip);
        }
        public override void Awake()
        {
            foreach (KeyValuePair <PrefabNames, int> kv in PoolConfigs)
            {
                string     prefabName = kv.Key.ToString();
                GameObject go_Prefab  = PrefabManager.Instance.GetPrefab(prefabName);
                if (go_Prefab)
                {
                    GameObject     go   = new GameObject("Pool_" + prefabName);
                    GameObjectPool pool = go.AddComponent <GameObjectPool>();
                    pool.transform.SetParent(Root);
                    PoolDict.Add(kv.Key, pool);
                    PoolObject po = go_Prefab.GetComponent <PoolObject>();
                    pool.Initiate(po, kv.Value);
                }
            }

            foreach (KeyValuePair <string, MechaComponentConfig> kv in ConfigManager.MechaComponentConfigDict)
            {
                GameObject go_Prefab = PrefabManager.Instance.GetPrefab(kv.Value.MechaComponentKey);
                if (go_Prefab)
                {
                    GameObject     go   = new GameObject("Pool_" + kv.Value.MechaComponentKey);
                    GameObjectPool pool = go.AddComponent <GameObjectPool>();
                    pool.transform.SetParent(Root);
                    MechaComponentPoolDict.Add(kv.Value.MechaComponentKey, pool);
                    PoolObject po = go_Prefab.GetComponent <PoolObject>();
                    pool.Initiate(po, 20);
                }
            }

            foreach (string s in Enum.GetNames(typeof(ProjectileType)))
            {
                string         prefabName     = s;
                ProjectileType projectileType = (ProjectileType)Enum.Parse(typeof(ProjectileType), s);
                GameObject     go_Prefab      = PrefabManager.Instance.GetPrefab(prefabName);
                if (go_Prefab)
                {
                    GameObject     go   = new GameObject("Pool_" + prefabName);
                    GameObjectPool pool = go.AddComponent <GameObjectPool>();
                    pool.transform.SetParent(Root);
                    ProjectileDict.Add(projectileType, pool);
                    PoolObject po = go_Prefab.GetComponent <PoolObject>();
                    pool.Initiate(po, 20);
                }
            }

            foreach (string s in Enum.GetNames(typeof(ProjectileType)))
            {
                string         prefabName     = s.Replace("Projectile_", "Hit_");
                ProjectileType projectileType = (ProjectileType)Enum.Parse(typeof(ProjectileType), s);

                GameObject go_Prefab = PrefabManager.Instance.GetPrefab(prefabName);
                if (go_Prefab)
                {
                    GameObject     go   = new GameObject("Pool_" + prefabName);
                    GameObjectPool pool = go.AddComponent <GameObjectPool>();
                    pool.transform.SetParent(Root);
                    ProjectileHitDict.Add(projectileType, pool);
                    PoolObject po = go_Prefab.GetComponent <PoolObject>();
                    pool.Initiate(po, 20);
                }
            }

            foreach (string s in Enum.GetNames(typeof(ProjectileType)))
            {
                string         prefabName     = s.Replace("Projectile_", "Flash_");
                ProjectileType projectileType = (ProjectileType)Enum.Parse(typeof(ProjectileType), s);

                GameObject go_Prefab = PrefabManager.Instance.GetPrefab(prefabName);
                if (go_Prefab)
                {
                    GameObject     go   = new GameObject("Pool_" + prefabName);
                    GameObjectPool pool = go.AddComponent <GameObjectPool>();
                    pool.transform.SetParent(Root);
                    ProjectileFlashDict.Add(projectileType, pool);
                    PoolObject po = go_Prefab.GetComponent <PoolObject>();
                    pool.Initiate(po, 20);
                }
            }

            foreach (string s in Enum.GetNames(typeof(FX_Type)))
            {
                FX_Type    fx_Type   = (FX_Type)Enum.Parse(typeof(FX_Type), s);
                GameObject go_Prefab = PrefabManager.Instance.GetPrefab(s);
                if (go_Prefab)
                {
                    GameObject     go   = new GameObject("Pool_" + s);
                    GameObjectPool pool = go.AddComponent <GameObjectPool>();
                    pool.transform.SetParent(Root);
                    FXDict.Add(fx_Type, pool);
                    PoolObject po = go_Prefab.GetComponent <PoolObject>();
                    pool.Initiate(po, 20);
                }
            }

            foreach (string s in Enum.GetNames(typeof(BattleTipPrefabType)))
            {
                BattleTipPrefabType bt_Type   = (BattleTipPrefabType)Enum.Parse(typeof(BattleTipPrefabType), s);
                GameObject          go_Prefab = PrefabManager.Instance.GetPrefab(s);
                if (go_Prefab)
                {
                    GameObject     go   = new GameObject("Pool_" + s);
                    GameObjectPool pool = go.AddComponent <GameObjectPool>();
                    pool.transform.SetParent(Root);
                    BattleUIDict.Add(bt_Type, pool);
                    PoolObject po = go_Prefab.GetComponent <PoolObject>();
                    pool.Initiate(po, 20);
                }
            }

            IsInit = true;
        }