예제 #1
0
 public Collision(Sprite playerSprite, Alien alien, BulletList bullets, Asteroid asteroids)
 {
     this.playerSprite = playerSprite;
     this.alien = alien;
     this.bullets = bullets;
     this.asteroids = asteroids;
 }
예제 #2
0
파일: Game1.cs 프로젝트: Siryu/Asteroids
        /// <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");
        }