Пример #1
0
    /// <summary>
    /// 选定目标的魔法
    /// </summary>
    public static IEnumerator AcitveSkillMagic_Single(FightUnit attacker, FightUnit target, ActiveSkill skill)
    {
        skill.StartCoroutine(skill.DisplaydmgEffect(target));
        if (skill.magicDelay.Length > 0)
        {
            for (int i = 0; i < skill.magicDelay.Length; i++)
            {
                yield return(new WaitForSeconds(skill.magicDelay[i]));

                if (skill.normalSkill.attackType == (int)SkillType.Hurt)
                {
                    ActiveSkillDamage(attacker, target, skill);
                }
                else
                {
                    FightCure(attacker, target, skill);
                }
            }
        }
        else
        {
            if (skill.normalSkill.attackType == (int)SkillType.Hurt)
            {
                ActiveSkillDamage(attacker, target, skill);
            }
            else
            {
                FightCure(attacker, target, skill);
            }
        }
    }
Пример #2
0
    /// <summary>
    /// 非选定目标的魔法播放过程中再进行目标选取
    /// </summary>
    public static IEnumerator AcitveSkillMagic_Whole(FightUnit attacker, FightUnit target, ActiveSkill skill)
    {
        skill.StartCoroutine(skill.DisplaydmgEffect(null));
        if (skill.magicDelay.Length > 0)
        {
            for (int i = 0; i < skill.magicDelay.Length; i++)
            {
                yield return(new WaitForSeconds(skill.magicDelay[i]));

                ActiveSkillSelect(attacker, target, skill);
            }
        }
        else
        {
            ActiveSkillSelect(attacker, target, skill);
        }
    }