private IEnumerator OnShowAllFight(List <DamageData> allDamage)
    {
        for (int i = 0; i < allDamage.Count; i++)
        {
            FightItemButton target = null;
            Vector3         orgPos = allDamage[i].tType[0] == "P" ? playerButtonPos [allDamage [i].orgIdx] : enemyButtonPos [allDamage [i].orgIdx];

            //當TargetIdx重複時會加10,此時需要減去10
            int minusCount = allDamage [i].targetIdx >= 10 ? 10 : 0;

            target = allDamage[i].tType[1] == "P" ? playerButton [allDamage [i].targetIdx - minusCount] : enemyButton [allDamage [i].targetIdx - minusCount];
            Vector3 targetPos = allDamage[i].tType[1] == "P" ? playerButtonPos [allDamage [i].targetIdx - minusCount] : enemyButtonPos [allDamage [i].targetIdx - minusCount];

            GroundSEController gse = SEPool.Dequeue();
            gse.SetAttackShow(orgPos, targetPos, target, allDamage [i]);
            gse.onRecycleDamage = ShowFightEnd;
            gse.gameObject.SetActive(true);
            gse.Run();

            if (i == 0)
            {
                if (allDamage.Count == 1)
                {
                    yield return(new WaitForSeconds(0.5f));            //該名角色最後攻擊所需時間
                }
                yield return(new WaitForSeconds(0.2f));                //該名角色的物理及魔法攻擊的顯示間隔
            }
            else
            {
                yield return(new WaitForSeconds(0.5f));                //該名角色最後攻擊所需時間
            }
        }

        fightController.OnTriggerSkill(allDamage);
    }
    private IEnumerator CheckRatio()
    {
        if (allRatioData.Count > recAllRatioData.Count)
        {
            foreach (var data in allRatioData)
            {
                bool hasNew = true;

                if (recAllRatioData.Count > 0)
                {
                    foreach (var recData in recAllRatioData)
                    {
                        if (data.start == recData.start && data.end == recData.end)
                        {
                            hasNew = false;
                            break;
                        }
                    }
                }

                if (hasNew == true)
                {
                    //Debug.LogWarning (data.ratio);
                    List <Vector3> postions = new List <Vector3> ();
                    for (int i = 0; i < fightController.players.Length; i++)
                    {
                        if (fightController.GetJob("P", i) == data.CharaJob)
                        {
                            postions.Add(playerButtonPos [i] + (Vector3.up * 30) * (ratioCount [i] - 1));

                            ratioCount [i]++;
                        }
                    }
                    if (SEPool.Count <= 0)
                    {
                        CreateSE();
                    }
                    GroundSEController gse = SEPool.Dequeue();

                    gse.SetReverseSE(data.hits, postions);
                    gse.onRecycle = RecycleReverseItem;
                    SEingPool.Enqueue(gse);
                }
            }
        }

        unShowed = SEingPool.Count;
        while (SEingPool.Count > 0)
        {
            GroundSEController gse = SEingPool.Dequeue();
            gse.gameObject.SetActive(true);
            gse.Run();
            yield return(new WaitForSeconds(0.5f * (gse.seGrounds.Count - 1)));
        }
    }
 private void ShowFightEnd(GroundSEController gse, DamageData damageData, FightItemButton target, Vector3 tPos)
 {
     gse.gameObject.SetActive(false);
     target.SetHpBar(damageData.hpRatio);
     SEPool.Enqueue(gse);
     gse.onRecycle = null;
     gse.SetDamageShow(damageData, tPos);
     gse.onRecycle = ShowDamageEnd;
     gse.gameObject.SetActive(true);
     gse.Run();
 }
    private IEnumerator OnShowExtra()
    {
        foreach (var data in ExtraRatios)
        {
            List <GroundController> org = new List <GroundController> ();
            org.Add(data.gc);
            recJobRatios [data.extraJob] += data.upRatio;
            for (int i = 0; i < recAllRatioData.Count; i++)
            {
                if (recAllRatioData [i].start.name == data.linkData.ElementAt(0).Key.name&& recAllRatioData [i].end.name == data.linkData.ElementAt(0).Value.name)
                {
                    RaycastData raycastdata = new RaycastData();
                    raycastdata         = recAllRatioData [i];
                    raycastdata.ratio  += data.upRatio;
                    recAllRatioData [i] = raycastdata;
                }
            }
            for (int i = 0; i < fightController.players.Length; i++)
            {
                if (fightController.GetJob("P", i) == data.extraJob)
                {
                    GroundSEController gse = SEPool.Dequeue();
                    gse.SetExtraSE(org, playerButtonPos [i], i, data.upRatio);
                    gse.onRecycle = RecycleExtraItem;
                    gse.onExtraUp = ExtraRatioUp;
                    SEingPool.Enqueue(gse);
                    AddCanAttack(i);
                }
            }
        }

        unShowed = SEingPool.Count;
        while (SEingPool.Count > 0)
        {
            GroundSEController gse = SEingPool.Dequeue();
            gse.gameObject.SetActive(true);
            gse.Run();
            yield return(new WaitForSeconds(0.2f));
        }
    }