/// <summary> /// Start the level /// </summary> private void StartLevel() { isLoadingLevel = false; // Set the update method back to the SmartUpdate before the game resumes. _cinemachineBrain.m_UpdateMethod = CinemachineBrain.UpdateMethod.SmartUpdate; OnLevelStarted?.Invoke(curLevelID); GameResume(); }
public void StartGame() { gameState = GameStates.Play; enemySpawner.CurrentWave = 0; enemySpawner.StartNextWave(); OnLevelStarted?.Invoke(enemySpawner.CurrentWave, enemySpawner.MaxWave); OnGameStarted?.Invoke(); }
private void UpdateWaves() { if (enemiesCurrentWave.Count == 0) { enemySpawner.StartNextWave(); OnLevelStarted?.Invoke(enemySpawner.CurrentWave, enemySpawner.MaxWave); } }
protected override void SetLevel(BaseLevel level) { LevelNum = level.levelNum; foreach (TrashAssets trash in Level.trashes) { trashes.Add(trash); } OnLevelStarted.Invoke(); }
private void StartLevel() { _currentLevel.OnSetuped -= StartLevel; if (_currentLevel.IsStarted) { throw new Exception($"Level \"{_currentLevel}\" Already Started"); } _currentLevel.LevelStart(); OnLevelStarted?.Invoke(); }