예제 #1
0
    // child should override this function
    public override bool StopSkill(SkillNode node)
    {
        IShooterSkill ss = m_SkillManager.GetCurPlaySkill();

        if (ss != null)
        {
            ss.StopSkill();
        }
        return(true);
    }
예제 #2
0
    public bool ForceStartSkillById(int skillid)
    {
        IShooterSkill ss = GetSkillById(skillid);

        if (ss == null)
        {
            return(false);
        }
        if (m_CurPlaySkill == null || ss.CanStart())
        {
            Vector3 targetPos = Vector3.zero;
            if (m_CurPlaySkill != null)
            {
                targetPos = m_CurPlaySkill.GetTargetPos();
                m_CurPlaySkill.StopSkill();
            }
            if (ss.StartSkill(targetPos))
            {
                m_CurPlaySkill = ss;
                return(true);
            }
        }
        return(false);
    }