Esempio n. 1
0
 private void RemoveMonster(Monster monster)
 {
     if (_isClosed == true)
     {
         monsters.Remove(monster);
         if (monsters.Count == 0)
         {
             _isClear = true;
             OnRoomCleared?.Invoke(this);
         }
     }
 }
Esempio n. 2
0
 private void RemoveEnemy(EnemyHealthBehaviour enemy)
 {
     if (_isClosed == true)
     {
         Transform enemyTransform = enemy.transform;
         Enemies.Remove(enemy);
         if (Enemies.Count == 0 && _isClear == false)
         {
             _isClear = true;
             OnLastEnemyKilled?.Invoke(enemyTransform);
             OnRoomCleared?.Invoke(this);
         }
     }
 }