private void InitNewRound() { // Create new Round level.CleanRound(); // Create round objectives (60s timeout or kill everyone) roundObjectiveManager = new ObjectiveManager(); roundObjectiveManager.Add(new ObjectiveTimer(60)); roundObjectiveManager.Add(new ObjectiveRoundFinish()); roundObjectiveManager.Completed += FinishRound; roundObjectiveManager.Failed += FinishRound; level.InitRound(players.ToList()); }
protected override void Awake() { base.Awake(); DebugSetup(); InitGameStates(); // First to score 5 -> win the match gameObjectiveManager = new ObjectiveManager(); gameObjectiveManager.Add(new ObjectiveGameFinish(10)); gameObjectiveManager.Completed += (sender, args) => States.ChangeState(GameStates.GameResult); }