/// <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() { // TODO: Add your initialization logic here spriteManager = new SpriteManager(this); Components.Add(spriteManager); // Disable Added GameComponent update and draw method spriteManager.Enabled = false; spriteManager.Visible = false; applePos = new Vector2(150, 150); 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() { // TODO: Add your initialization logic here spriteManager = new SpriteManager(this); Components.Add(spriteManager); // Disable Added GameComponent update and draw method spriteManager.Enabled = false; spriteManager.Visible = false; // Initialize timer gameTimer = 45; // Initialize score currentScore = 0; // Initialize Game State currentGameState = GameState.Start; base.Initialize(); }