/// <summary> /// This method is called ONCE per session, and is called from the Update() Loop the first time it is ever ran. /// Used for multithreaded initialization /// </summary> private void FirstUpdate() { //TODO: Loading screen, run this on a separate thread #if !CONSOLE && CLIENT DiscordManager.InitialiseDiscord(); #endif #if CLIENT OnTargetFPSChanged(); Snooper.Initialise(); InputManager.Initialise(); //TODO: Rework for UI system font = Content.Load <SpriteFont>("MainFont"); #endif //TODO: Connect textures by string, and models are reloaded after textures are reloaded. TextureManager.Reload(); //Initialise the Block & Item Managers blockRegistry = new BlockManager(); itemRegistry = new ItemManager(); //Register the blocks and items BlockManager.RegisterBlocks(); ItemManager.RegisterItems(); GameSettings.Load(Path.Combine(gameDirectory, "options.txt")); #if DEBUG GameSettings.LoadDebug(Path.Combine(gameDirectory, "options.debug")); #endif #if CLIENT //Register the UI Menus UiRegisterer.RegisterUiMenus(); Window.TextInput += OnTextInput; #endif }