Example #1
0
 public virtual void TriggerEnter(DrivingTrigger driving, PassiveTrigger passive)
 {
     if (inEffect != null)
     {
         foreach (InEffect d in inEffect.GetInvocationList())
         {
             try
             {
                 d.Invoke(driving, passive);
             }
             catch (Exception e)
             {
                 Debug.LogException(e);
             }
         }
     }
 }
Example #2
0
 public override void TriggerEnter(DrivingTrigger driving, PassiveTrigger passive)
 {
     HashSet<PassiveTrigger> ptSet;
     if (!mDrivingToPassive.TryGetValue(driving, out ptSet))
         mDrivingToPassive.Add(driving, ptSet = new HashSet<PassiveTrigger>());
     if (driving.stateMachine == this)
     {
         if (mCurrentState == State.攻击第一段)
         {
             if (ptSet.Contains(passive))
                 return;
             ptSet.Add(passive);
             passive.stateMachine.InternalCastHP(mCastHP[mCurrentState]);
             passive.stateMachine.InternalSwitchGreatDamage();
             StartCoroutine(DamageBack(passive.stateMachine));
         }
         if (mCurrentState == State.攻击第二段)
         {
             if (ptSet.Contains(passive))
                 return;
             ptSet.Add(passive);
             passive.stateMachine.InternalCastHP(mCastHP[mCurrentState]);
             passive.stateMachine.InternalSwitchGreatDamage();
             StartCoroutine(DamageBack(passive.stateMachine));
         }
         if (mCurrentState == State.后跳攻击)
         {
             if (ptSet.Contains(passive))
                 return;
             ptSet.Add(passive);
             passive.stateMachine.InternalCastHP(mCastHP[mCurrentState]);
             passive.stateMachine.InternalSwitchGreatDamage();
             StartCoroutine(DamageBack(passive.stateMachine));
         }
     }
     else
     {
     }
 }