Inheritance: IDisposable
示例#1
0
 internal static void Setup(GameProperties properties, Action initializer)
 {
     if (SetupCalled)
     {
         throw new EngineSetupException("Engine.Setup called multiple times.");
     }
     Instance = new ArtemisEngine(properties, initializer);
     Instance.Run();
 }
示例#2
0
        public GameKernel(ArtemisEngine engine)
            : base()
        {
            this.engine = engine;

            graphics = new GraphicsDeviceManager(this);

            Content.RootDirectory = engine._GameProperties.ContentFolder;
            AssetLoader.Initialize(Content);
        }
示例#3
0
        public GameKernel(ArtemisEngine engine)
            : base()
        {
            this.engine = engine;

            graphics = new GraphicsDeviceManager(this);

            Content.RootDirectory = engine._GameProperties.ContentFolder;
            AssetLoader.Initialize(Content);
        }
        public GameKernel(ArtemisEngine engine, string contentFolder, bool fixedTimeStep, int frameRate)
            : base()
        {
            this.engine = engine;

            IsFixedTimeStep = fixedTimeStep;
            FrameRate = frameRate;

            graphics = new GraphicsDeviceManager(this);

            Content.RootDirectory = contentFolder;
            AssetLoader.Initialize(Content);
        }
示例#5
0
        public GameKernel(ArtemisEngine engine, string contentFolder, bool fixedTimeStep, int frameRate)
            : base()
        {
            this.engine = engine;

            IsFixedTimeStep = fixedTimeStep;
            FrameRate       = frameRate;

            graphics = new GraphicsDeviceManager(this);

            Content.RootDirectory = contentFolder;
            AssetLoader.Initialize(Content);
        }
示例#6
0
        /// <summary>
        /// Begin the game.
        /// </summary>
        /// <param name="initializer"></param>
        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();
            }
        }
        /// <summary>
        /// Begin the game.
        /// </summary>
        /// <param name="initializer"></param>
        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();
        }
示例#8
0
 internal static void Setup(GameProperties properties, Action initializer)
 {
     if (SetupCalled)
     {
         throw new EngineSetupException("Engine.Setup called multiple times.");
     }
     Instance = new ArtemisEngine(properties, initializer);
     Instance.Run();
 }