Artemis.Engine.ArtemisEngine.Begin C# (CSharp) Method

Begin() public static method

Begin the game.
public static Begin ( System.Action initializer ) : void
initializer System.Action
return void
        public static void Begin(Action initializer)
        {
            if (!SetupCalled)
            {
                throw new EngineSetupException("Engine.Setup has not yet been called.");
            }
            if (BeginCalled)
            {
                throw new EngineSetupException("Engine.Begin called multiple times.");
            }

            Instance = new ArtemisEngine(initializer);
            Instance.Run();

            // Anything that happens after the above line will happen after the game window closes.

            if (!GameConstants.DisableUserOptionsWriteOnClose)
                UserOptions.Write();
        }