/// <summary> /// Loads the given level. /// </summary> /// <param name="level"></param> public void LoadLevel([NotNull] Level level) { ActiveLevel?.OnGameEnd(); ActiveLevel?.ShutdownLevel(); ActiveLevel = level; level.LevelID = ++LevelIDCounter; level.Loaded = true; level.OnLevelLoad(); level.Ticking = true; }
private void OnEngineShutdown(EngineShutdownMessage msg) { ActiveLevel?.OnGameEnd(); ActiveLevel?.ShutdownLevel(); }