예제 #1
0
 /// <summary>
 /// 打断
 /// </summary>
 /// <param name="interruptType"></param>
 public void Interrupt(SkillInteraputType interruptType)
 {
     if (CanInterrupt(interruptType))
     {
         Phase = SkillPhase.None;
     }
     else
     {
     }
 }
예제 #2
0
 public void Interrupt(SkillInteraputType interruptType)
 {
     foreach (var item in _baseSkills)
     {
         if (item.IsRunning)
         {
             item.Interrupt(interruptType);
         }
     }
 }
예제 #3
0
 /// <summary>
 /// 是否可以被打断
 /// </summary>
 /// <param name="interruptType"></param>
 /// <returns></returns>
 public bool CanInterrupt(SkillInteraputType interruptType)
 {
     if (Phase == SkillPhase.None ||
         Phase == SkillPhase.Hold)
     {
         return(false);
     }
     if (Phase == SkillPhase.Start)
     {
         return((OnStart_InteraputType & interruptType) > 0);
     }
     else if (Phase == SkillPhase.Cast)
     {
         return((OnCast_InteraputType & interruptType) > 0);
     }
     else if (Phase == SkillPhase.CastEnd)
     {
         return((OnCastEnd_InteraputType & interruptType) > 0);
     }
     return(true);
 }