Esempio n. 1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            player = new Sprite(graphics, Content.Load <Texture2D>("playerShip"));

            alien = new Alien(Content, graphics, player);

            spriteBatch = new SpriteBatch(GraphicsDevice);
            background  = new Background(graphics.GraphicsDevice, spriteBatch, Content);
            bullets     = new BulletList();
            asteroids   = new Asteroid(Content, graphics);
            keyboard    = new KeyBoardManager(Content);
            collision   = new Collision(player, alien, bullets, asteroids);

            font = Content.Load <SpriteFont>("Font");
        }
Esempio n. 2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            player = new Sprite(graphics, Content.Load<Texture2D>("playerShip"));

            alien = new Alien(Content, graphics, player);

            spriteBatch = new SpriteBatch(GraphicsDevice);
            background = new Background(graphics.GraphicsDevice, spriteBatch, Content);
            bullets = new BulletList();
            asteroids = new Asteroid(Content, graphics);
            keyboard = new KeyBoardManager(Content);
            collision = new Collision(player, alien, bullets, asteroids);

            font = Content.Load<SpriteFont>("Font");
        }