Exemplo n.º 1
0
        private ArtemisEngine(Action initializer) : base()
        {
            this.initializer = initializer;
            Initialized      = false;

            gameKernel = new GameKernel(
                this,
                GameConstants.ContentFolder,
                GameConstants.FixedTimeStep,
                GameConstants.DefaultFrameRate);

            // This should really be called *before* the ArtemisEngine singleton instance
            // is even created, but right now we have to call it after created the gameKernel
            // since gameKernel.FrameRate gets changed by an event that gets raised when the
            // "FrameRate" option gets changed in UserOptions (which will throw a NullReferenceException
            // if gameKernel is null).
            UserOptions.Read();

            _MultiformManager = new MultiformManager();
            _GameTimer        = new GlobalTimer();
            _GameUpdater      = new GlobalUpdater();
            _Mouse            = new MouseInput();
            _Keyboard         = new KeyboardInput();
        }