/// <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() { Vector2 position = new Vector2(); for (int index = 0; index < OuyaController.MAX_CONTROLLERS; ++index) { VirtualControllerSprite controller = new VirtualControllerSprite(); switch (index) { case 0: position = new Vector2(500, 200); break; case 1: position = new Vector2(1100, 200); break; case 2: position = new Vector2(500, 500); break; case 3: position = new Vector2(1100, 500); break; } controller.Index = index; controller.Position = position; Controllers.Add(controller); } 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() { Vector2 position = new Vector2(); for (int index = 0; index < OuyaController.MAX_CONTROLLERS; ++index) { VirtualControllerSprite controller = new VirtualControllerSprite(); switch (index) { case 0: position = new Vector2(500, 200); break; case 1: position = new Vector2(1100, 200); break; case 2: position = new Vector2(500, 500); break; case 3: position = new Vector2(1100, 500); break; } controller.Index = index; controller.Position = position; Controllers.Add(controller); } base.Initialize(); }