예제 #1
0
 public void TakeDamage(int damage)
 {
     if (!state.getStasis())
     {
         health -= damage;
         sound1.Link_Hurt();
         state.damage();
     }
 }
예제 #2
0
파일: Player.cs 프로젝트: Group4-CSE/Zelda
 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();
     }
 }