/// <summary> /// 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. /// </summary> protected override void Initialize() { base.Initialize(); this.runner = new TestRunner <Game1>(this.Services); this.reporter = new XnaTestReporter(); this.runner.Reporter(this.reporter); this.font = this.Content.Load <SpriteFont>("font"); }
/// <summary> /// 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. /// </summary> protected override void Initialize() { base.Initialize(); this.runner = new TestRunner<Game1>(this.Services); this.reporter = new XnaTestReporter(); this.runner.Reporter(this.reporter); this.font = this.Content.Load<SpriteFont>("font"); }
/// <summary> /// 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. /// </summary> protected override void Initialize() { Renderer.UseRenderTargets = false; FlatRedBallServices.InitializeFlatRedBall(this, graphics); GlobalContent.Initialize(); FlatRedBall.Screens.ScreenManager.Start(typeof(TestableGame.Screens.TestScreen)); SpriteManager.Camera.BackgroundColor = Color.Black; IsMouseVisible = true; this.runner = new TestRunner<Game1>(this.Services); this.reporter = new XnaTestReporter(); this.runner.Reporter(this.reporter); this.font = this.Content.Load<SpriteFont>("font"); var sos = SpriterObjectSave.FromFile( @"c:\flatredballprojects\flatredball-spriter\spriterfiles\simpleballanimation\simpleballanimation.scml"); var oldDir = FileManager.RelativeDirectory; FileManager.RelativeDirectory = FileManager.GetDirectory( @"c:/flatredballprojects/flatredball-spriter/spriterfiles/simpleballanimation/ball.png"); so = sos.ToRuntime(); FileManager.RelativeDirectory = oldDir; so.X = 300f; so.Y = 300f; so.AddToManagers(null); SpriteManager.Camera.Position.Z += 1900; SpriteManager.Camera.Position.Y -= 300; SpriteManager.Camera.FarClipPlane = 30000f; base.Initialize(); }