Exemple #1
0
 /// <summary>
 /// Exits the game. This must always be called from <see cref="InputThread"/>.
 /// </summary>
 private void exit()
 {
     // exit() may be called without having been scheduled from Exit(), so ensure the correct exiting state
     executionState = ExecutionState.Stopping;
     Window?.Close();
     stopAllThreads();
     executionState = ExecutionState.Stopped;
 }
Exemple #2
0
        public void Exit()
        {
            exitInitiated = true;

            InputThread.Scheduler.Add(delegate
            {
                Window?.Close();
                stopAllThreads();
                exitCompleted = true;
            }, false);
        }