Beispiel #1
0
    public void showCurrentUnitSkillTarget(bool showDieTarget = false)
    {
        SkillAim aim = SkillAim.Other;

        if (_currentActionPanel != null && _currentActionPanel.CurrentSkill != null)
        {
            aim = _currentActionPanel.CurrentSkill.ThisSkillAim;
        }
        int t = 0;

        if (aim == SkillAim.Friend)
        {
            t = _currentBattleUnit.IsEnemy ? 1 : -1;
        }
        else if (aim == SkillAim.Other)
        {
            t = _currentBattleUnit.IsEnemy ? -1 : 1;
        }
        if (aim == SkillAim.Self)
        {
            for (int i = 0; i < AllSRL_Array.Count; i++)
            {
                AllSRL_Array[i].IsOptionTarget = false;
                AllSRL_Array[i].SetOptionSignState();
            }
            for (int i = 0; i < AllORL_Array.Count; i++)
            {
                AllORL_Array[i].IsOptionTarget = false;
                AllORL_Array[i].SetOptionSignState();
            }
            _currentBattleUnit.IsOptionTarget = true;
            _currentBattleUnit.SetOptionSignState();
        }
        else
        {
            if (t == -1)
            {
                for (int i = 0; i < AllSRL_Array.Count; i++)
                {
                    if (AllSRL_Array[i].IsDead && !showDieTarget)
                    {
                        AllSRL_Array[i].IsOptionTarget = false;
                    }
                    else
                    {
                        AllSRL_Array[i].IsOptionTarget = true;
                    }
                    AllSRL_Array[i].SetOptionSignState();
                }
                for (int i = 0; i < AllORL_Array.Count; i++)
                {
                    AllORL_Array[i].IsOptionTarget = false;
                    AllORL_Array[i].SetOptionSignState();
                }
            }
            else if (t == 1)
            {
                for (int i = 0; i < AllORL_Array.Count; i++)
                {
                    if (AllORL_Array[i].IsDead && !showDieTarget)
                    {
                        AllORL_Array[i].IsOptionTarget = false;
                    }
                    else
                    {
                        AllORL_Array[i].IsOptionTarget = true;
                    }
                    AllORL_Array[i].SetOptionSignState();
                }
                for (int i = 0; i < AllSRL_Array.Count; i++)
                {
                    AllSRL_Array[i].IsOptionTarget = false;
                    AllSRL_Array[i].SetOptionSignState();
                }
            }
            else //skillAim.all 触发
            {
                for (int i = 0; i < AllSRL_Array.Count; i++)
                {
                    if (AllSRL_Array[i].IsDead && !showDieTarget)
                    {
                        AllSRL_Array[i].IsOptionTarget = false;
                    }
                    else
                    {
                        AllSRL_Array[i].IsOptionTarget = true;
                    }
                    AllSRL_Array[i].SetOptionSignState();
                }
                for (int i = 0; i < AllORL_Array.Count; i++)
                {
                    if (AllORL_Array[i].IsDead && !showDieTarget)
                    {
                        AllORL_Array[i].IsOptionTarget = false;
                    }
                    else
                    {
                        AllORL_Array[i].IsOptionTarget = true;
                    }
                    AllORL_Array[i].SetOptionSignState();
                }
            }
        }
    }