public CollisionSystem(ProjectileSystem projectileSystem, SpaceShipSystem spaceShipSystem, AsteroidSystem asteroidSystem, ExplosionSystem explosionSystem, ScoreSystem scoreSystem) { m_projectileSystem = projectileSystem; m_spaceShipSystem = spaceShipSystem; m_asteroidSystem = asteroidSystem; m_explosionSystem = explosionSystem; m_scoreSystem = scoreSystem; }
protected override void LoadContent() { // initialize sprite batching and the sprite sheet collection spriteBatch = new SpriteBatch(GraphicsDevice); spriteSheets = SpriteSheetCollection.parseFrom(settings.spriteSheetFileName, content); if(spriteSheets == null) { Exit(); } // initialize the game management systems projectileSystem = new ProjectileSystem(spriteSheets, settings, content); spaceShipSystem = new SpaceShipSystem(spriteSheets, projectileSystem, settings, content); asteroidSystem = new AsteroidSystem(spriteSheets, spaceShipSystem, settings); explosionSystem = new ExplosionSystem(spriteSheets, content); scoreSystem = new ScoreSystem(spaceShipSystem, content, settings); collisionSystem = new CollisionSystem(projectileSystem, spaceShipSystem, asteroidSystem, explosionSystem, scoreSystem); // initialize the menu menu = new Menu(this, spaceShipSystem, settings, content); // load and start the background music (if appropriate) backgroundMusic = content.Load<Song>("myg0t"); MediaPlayer.IsRepeating = true; if(settings.musicEnabled) { MediaPlayer.Play(backgroundMusic); } }