Esempio n. 1
0
        /// <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;
        }
Esempio n. 2
0
 private void OnEngineShutdown(EngineShutdownMessage msg)
 {
     ActiveLevel?.OnGameEnd();
     ActiveLevel?.ShutdownLevel();
 }