예제 #1
0
    public override bool IsSkillCanBreak(SkillNode node, SkillCategory category)
    {
        if (m_CurSkillNode == null)
        {
            return(true);
        }
        IShooterSkill skill = m_SkillManager.GetSkillById(node.SkillId);

        if (skill == null || !skill.IsExecuting())
        {
            return(true);
        }
        if (category != SkillCategory.kNone)
        {
            if (m_CurSkillNode.Category == SkillCategory.kAttack &&
                category == SkillCategory.kAttack &&
                m_CurSkillNode.NextSkillNode != null)
            {
                return(false);
            }
            else if (m_CurSkillNode.Category != SkillCategory.kAttack &&
                     category == SkillCategory.kAttack)
            {
                return(skill.CanBreak());
            }
            else
            {
                return(skill.CanBreakBySkill());
            }
        }
        return(skill.CanBreak());
    }