SkillBase.End C# (CSharp) Method

End() private method

private End ( ) : bool
return bool
    private bool End()
    {
        if (demoCount > 30)
        {
            return true;
        }
        else
        {
          //  Debug.Log("Skill End +");
            return false;
        }
        // is end.
    }

Usage Example

Example #1
0
    /// <summary>
    /// 参数1的技能是否可以被当前打断
    /// </summary>
    /// <returns></returns>
    public bool IsCancel(SkillBase skill)
    {
        //当前没有技能处于激活中
        if (activeId == 0)
        {
            return(true);
        }
        //是当前技能
        if (activeId == skill.GetId())
        {
            if (skill.DoubleActive)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }

        SkillBase activeSkill = GetActiveSkill();

        //无法找到当前激活的技能,允许释放其他技能
        if (activeSkill == null)
        {
            return(true);
        }
        //目标技能是否可以被打断
        if (!activeSkill.BeAllCancel && !skill.CancelList.Contains(activeId))
        {
            return(false);
        }
        //强制结束技能
        activeSkill?.End();
        return(true);
    }