Beispiel #1
0
        public static bool Start(EngineConfiguration configuration)
        {
            ShutdownRequested = false;
            Log = new LogDispatcher();

            // Always send log messages to stdout.
            Log.RegisterReceiver(new ConsoleLogWriter());

            // Ensure the current platform is supported.
            if (!Platform.IsSupported())
            {
                Log.WriteLine("error/system/startup", "Unsupported platform");

                return(false);
            }

            try
            {
                Initialize(configuration);
            }
            catch (InitializeException e)
            {
                Log.WriteLine("error/system/startup", e.Message);

                return(false);
            }

            Run();
            Shutdown();

            return(true);
        }