/// <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()
        {
            RandomNumberGenerator.Initialize();
            int     x        = RandomNumberGenerator.Next(GraphicsDevice.Viewport.Width);
            int     y        = RandomNumberGenerator.Next(GraphicsDevice.Viewport.Height);
            Vector2 velocity = new Vector2(RandomNumberGenerator.NextFloat(1), RandomNumberGenerator.NextFloat(1));

            //ContentManager contentManager = new ContentManager();
            // burger = new Burger(Content, BurgetSpite, x, y, burgerShot);
            burger = new Burger(Content, "burger", GraphicsDevice.Viewport.TitleSafeArea.X, GraphicsDevice.Viewport.TitleSafeArea.Y + GraphicsDevice.Viewport.TitleSafeArea.Height / 2, burgerShot);
            base.Initialize();
        }
Exemplo n.º 2
0
        /// <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()
        {
            RandomNumberGenerator.Initialize();

            base.Initialize();
        }