// child should override this function public override bool StopSkill(SkillNode node) { IShooterSkill ss = m_SkillManager.GetCurPlaySkill(); if (ss != null) { ss.StopSkill(); } return(true); }
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); }