public void OnMissionFail() { missionMessageUI.text = "Mission fail!"; // Stop mission timer missionTimer.Stop(); // Print debug error Debug.Log("Mission Failed!"); }
private void MissionTimer_Elapsed(object sender, ElapsedEventArgs e) { RemaingingTime--; if (RemaingingTime <= 0) { if (GameController.IsGameTied() && !GameStarted) { GameController.StartGame(); GameStarted = true; } else { Logger.Debug("Ending mission"); Events.Raise(ServerEvents.EndMission); } MissionTimer.Stop(); } }
public void Stop() { Logger.Info("Stopping DM gamemode..."); GameStarted = false; MissionTimer?.Stop(); }