Exemplo n.º 1
0
 /// <summary>
 /// Enemy has reached the destination. Subtract a life from the player's health.
 /// Enemy dies but no points are rewarded.
 /// </summary>
 public void Attack()
 {
     if (_enemyHasAttacked)
     {
         return;
     }
     _enemyHasAttacked = true;
     _gameManager.UpdatePlayerHealth(_damage, Operator.Subtract);
     _health.Die();
 }