/// <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() { Window.Title = "QuadTree Testing"; qt = new QuadTree <IBounded>(GraphicsDevice.Viewport.Bounds); camera = new DebugGO(new Rectangle(0, 0, 160, 90)); gos = new DebugGO[numberToTest]; Random r = new Random(); for (int i = 0; i < gos.Length; i++) { gos[i] = new DebugGO(new Rectangle(r.Next(800 - 2), r.Next(480 - 2), 2, 2)); qt.Insert(gos[i]); } Console.WriteLine(GraphicsDevice.Viewport.Bounds); debugStatements = new Dictionary <String, String>(); debugStatements.Add("FPS", ""); debugStatements.Add("Frame time", ""); debugStatements.Add("Update time", ""); debugStatements.Add("Query time", ""); base.Initialize(); }
/// <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() { Window.Title = "QuadTree Testing"; qt = new QuadTree<IBounded>(GraphicsDevice.Viewport.Bounds); camera = new DebugGO(new Rectangle(0, 0, 160, 90)); gos = new DebugGO[numberToTest]; Random r = new Random(); for (int i = 0; i < gos.Length; i++) { gos[i] = new DebugGO(new Rectangle(r.Next(800 - 2), r.Next(480 - 2), 2, 2)); qt.Insert(gos[i]); } Console.WriteLine(GraphicsDevice.Viewport.Bounds); debugStatements = new Dictionary<String, String>(); debugStatements.Add("FPS", ""); debugStatements.Add("Frame time", ""); debugStatements.Add("Update time", ""); debugStatements.Add("Query time", ""); base.Initialize(); }