private static void SetupDevelopmentConsole() { if (Engine.Initialized) { OnInitializationFinished(); } else { Engine.OnInitializationFinished += OnInitializationFinished; } void OnInitializationFinished() { Engine.OnInitializationFinished -= OnInitializationFinished; if (!Engine.Configuration.EnableDevelopmentConsole) { return; } ConsoleGUI.ToggleKey = Engine.Configuration.ToggleConsoleKey; ConsoleGUI.Initialize(); // Process input starting with `@` as naninovel commands. InputPreprocessor.AddPreprocessor(ProcessActionInput); } }
private static void SetupDevelopmentConsole() { var config = Configuration.LoadOrDefault <EngineConfiguration>(); ConsoleGUI.AutoInitialize = config.EnableDevelopmentConsole; ConsoleGUI.ToggleKey = config.ToggleConsoleKey; // Process input starting with `@` as naninovel commands. InputPreprocessor.AddPreprocessor(ProcessActionInput); }