示例#1
0
 public void TakeDamage(int damage)
 {
     if (!state.getStasis())
     {
         health -= damage;
         sound1.Link_Hurt();
         state.damage();
     }
 }
示例#2
0
 public void TakeDamage(int damage)
 {
     if (!state.getStasis() && !invincible)
     {
         int damageDealt = (int)(damage * GameplayConstants.PLAYER_TAKE_DAMAGE_MODIFIER);
         if (damageDealt < 1)
         {
             damageDealt = 1;                 //make sure no damage is reduced to 0
         }
         health -= damageDealt;
         sound1.Link_Hurt();
         state.damage();
     }
 }