private void OnLevelInfoLoaded(object sender, LevelInfoEventArgs args) { var enemiesSpawnInfo = new List <EnemySpawnInfo>(args.LevelInfo.EnemiesSpawnInfo); enemiesSpawnInfo.Sort((x, y) => y.SpawnTime.CompareTo(x.SpawnTime)); _enemiesSpawnInfo = enemiesSpawnInfo; }
private void OnLevelInfoLoaded(object sender, LevelInfoEventArgs args) { LevelInfo = args.LevelInfo; LevelInfo.AllEnemiesDead += OnAllEnemiesDead; _levelLoader.LevelInfoLoadingCompleted -= OnLevelInfoLoaded; // _base.CurrentBase.LethalDamage+= OnDefeat; }