Reactor.ReactorGame.Initialize C# (CSharp) Method

Initialize() protected method

Allows the game to perform any initialization it needs to before starting to run. This is where it can query for any required services and load any non-graphic related content. Calling base.Initialize will enumerate through any components and initialize them as well.
protected Initialize ( ) : void
return void
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here

                base.Initialize();

                REngine.Instance._graphics = graphics;

                //REngine.Instance._resourceContent = new ResourceContentManager(Services, Resources.ResourceManager);
            #if !XBOX
                //REngine.Instance._systemfont = REngine.Instance._resourceContent.Load<SpriteFont>("Arial");
            #else
                //REngine.Instance._systemfont = REngine.Instance._resourceContent.Load<SpriteFont>("Tahoma1");
            #endif
                game.Init();

            #if XBOX
                services = new GamerServicesComponent(this);
                services.Initialize();
                this.Components.Add(services);

            #endif

                //pmv = new pmv1(this, graphics);
                //pmv.Initialize();
                //Components.Add(pmv);
            #if !XBOX
                //this.TargetElapsedTime = TimeSpan.FromMilliseconds(1.0);
                //this.InactiveSleepTime = TimeSpan.FromMilliseconds(1.0);
                //this.IsFixedTimeStep = false;
            #endif
                //graphics.PreferredBackBufferFormat = SurfaceFormat.Color;
                //graphics.PreferredDepthStencilFormat = DepthFormat.Depth32;
            #if !XBOX
                this.graphics.SynchronizeWithVerticalRetrace = true;
                this.graphics.PreferMultiSampling = false;
            #else
                this.graphics.SynchronizeWithVerticalRetrace = true;
                this.graphics.PreferMultiSampling = false;
            #endif

                this.graphics.ApplyChanges();
            #if !XBOX || !XBOX360
                //this.graphics.MinimumPixelShaderProfile = ShaderProfile.PS_3_0;
                //this.graphics.MinimumVertexShaderProfile = ShaderProfile.VS_3_0;
            #endif

                game.Load();
        }