public override void OnExit(GameTime gameTime)
{
MouseEventDispatcher.OnMousePress -= OnMP;
KeyboardEventDispatcher.OnKeyPressed -= OnKP;
KeyboardEventDispatcher.OnKeyReleased -= OnKR;
DevConsole.OnNewCommand -= DevConsole_OnNewCommand;
DevConsole.Deactivate();
camera.Controller.Unhook(game.Window);
renderer.Dispose();
Thread.VolatileWrite(ref playing, 0);
tEngine.Join();
GameEngine.Dispose(state);
state = null;
jukeBox.Dispose();
jukeBox = null;
if (tPopup != null)
{
tPopup.Dispose();
}
}