private void RemoveMonster(Monster monster) { if (_isClosed == true) { monsters.Remove(monster); if (monsters.Count == 0) { _isClear = true; OnRoomCleared?.Invoke(this); } } }
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); } } }