示例#1
0
 /**
  * Actual strike. Damage are dealt, dodge are tried and combo are increased
  */
 void StrikePoint()
 {
     // If the target has a dodge component and is actually dodging the strike is canceled
     if (target.GetDodge() != null)
     {
         if (target.GetDodge().IsDodging())
         {
             return;
         }
     }
     // If the pawn is a player, the combo are added to its comboMeter
     if (pawn is PawnPlayer)
     {
         PawnPlayer pawnPlayer = pawn as PawnPlayer;
         pawnPlayer.GetCombo().AddCombo(comboStrikeValue);
     }
     // Damage are dealt
     target.GetHealth().TakeDamage(attackDamage);
 }
示例#2
0
 public void Dodge()
 {
     pawn.GetAnimator().Play("Dodge");
     if (canDodge)
     {
         bDodging = true;
         if (pawn is PawnPlayer)
         {
             PawnPlayer pawnPlayer = pawn as PawnPlayer;
             pawnPlayer.GetCombo().AddCombo(1);
         }
     }
     else
     {
         // If the pawn is a player and he failed its dodge, the combo is reset
         if (pawn is PawnPlayer)
         {
             PawnPlayer pawnPlayer = pawn as PawnPlayer;
             pawnPlayer.GetCombo().ResetCombo();
         }
     }
 }