//################################# // LoadContent //################################# public override void LoadContent() { _stationSymbol = new UIItem(); _enemySymbol = new UIItem(); _stationSymbol.LoadContent("Images/station_icon", 4); _enemySymbol.LoadContent("Images/hit_marker", 4); _droneFleet.replaceOldDrone(new Vector3(150, 0, 100)); Global.Camera = new Camera(Global.GraphicsManager.GraphicsDevice.DisplayMode.AspectRatio, 10000f, MathHelper.ToRadians(45), 1f, Global.CameraPosition, _droneFleet.GetActiveDrone().Position, Vector3.Up); _station.LoadContent(); _sphere.LoadContent(); _asteroidField.LoadContent(); _ui.LoadContent(_droneFleet); _frame.LoadContent(); _waveBuilder.LoadContent(); _planet.LoadContent(); //Effects _stationEffect = Global.ContentManager.Load <Effect>("Effects/stationEffect"); //Sounds //playing the sound _soundEngine.setListenerPosToCameraTarget(); _soundEngine.AddSoundSourceFromFile("openShop", "Content/Media/Effects/OpenShop.wav"); _soundEngine.AddSoundSourceFromFile("explosionSource", "Content/Media/Effects/Objects/Explosion4.wav"); _soundEngine.AddSoundSourceFromFile("explosionSource1", "Content/Media/Effects/Objects/Explosion1.wav"); _soundEngine.AddSoundSourceFromFile("explosionSource2", "Content/Media/Effects/Objects/Explosion2.wav"); _soundEngine.AddSoundSourceFromFile("explosionSource3", "Content/Media/Effects/Objects/Explosion3.wav"); _soundEngine.AddSoundSourceFromFile("astexplosionSource1", "Content/Media/Effects/Objects/ExplosionAst1.wav"); _soundEngine.AddSoundSourceFromFile("astexplosionSource2", "Content/Media/Effects/Objects/ExplosionAst2.wav"); _soundEngine.AddSoundSourceFromFile("astexplosionSource3", "Content/Media/Effects/Objects/ExplosionAst3.wav"); _soundEngine.AddSoundSourceFromFile("hitSound", "Content/Media/Effects/Objects/GetHitShips.wav"); //Global.Music = _soundEngine.Play2D("explosionSource3", Global.MusicVolume / 10, false); captainDialog.LoadContent(); captain.LoadContent("Images/captain", 4); // X = left/right _soundEngine.setListenerPosToCameraTarget(); var pos = Global.Camera.Target; Global.Music = _soundEngine.Play3D("explosionSource3", Global.MusicVolume / 10, Global.Camera.Target, false); }
//################################# // LoadContent //################################# public override void LoadContent() { _stationSymbol = new UIItem(); _enemySymbol = new UIItem(); _stationSymbol.LoadContent("Images/station_icon", 4); _enemySymbol.LoadContent("Images/hit_marker", 4); _asteroid1 = Global.ContentManager.Load <Model>("Models/asteroid"); _asteroid2 = Global.ContentManager.Load <Model>("Models/asteroid2"); _asteroid3 = Global.ContentManager.Load <Model>("Models/asteroid3"); _astList.Add(new Asteroid(_asteroid1, new Vector3(250, 0, 150), 0, Vector3.Zero, 0, false)); _astList.Add(new Asteroid(_asteroid2, new Vector3(350, 0, 150), 0, Vector3.Zero, 0, false)); _astList.Add(new Asteroid(_asteroid3, new Vector3(450, 0, 150), 0, Vector3.Zero, 0, false)); foreach (Asteroid ast in _astList) { ast.LoadContent(); } _effectList.Add("Simple Explosion"); _effectList.Add("Ship Explosion"); _effectList.Add("Bomb Explosion"); _dialog = new Dialog(Global.GraphicsManager.GraphicsDevice.Viewport.Width - 380, Global.GraphicsManager.GraphicsDevice.Viewport.Height - 100, 70, 360, 8, false, true); _dialog.LoadContent(); _droneFleet.replaceOldDrone(new Vector3(150, 0, 100)); Global.Camera = new Camera(Global.GraphicsManager.GraphicsDevice.DisplayMode.AspectRatio, 10000f, MathHelper.ToRadians(45), 1f, Global.CameraPosition, _droneFleet.GetActiveDrone().Position, Vector3.Up); _station.LoadContent(); _sphere.LoadContent(); _asteroidField.LoadContent(); _ui.LoadContent(_droneFleet); _frame.LoadContent(); _waveBuilder.LoadContent(); _boidBuilder.LoadContent(); _planet.LoadContent(); //Effects _stationEffect = Global.ContentManager.Load <Effect>("Effects/stationEffect"); //Sounds //playing the sound _soundEngine.setListenerPosToCameraTarget(); _soundEngine.AddSoundSourceFromFile("openShop", "Content/Media/Effects/OpenShop.wav"); _soundEngine.AddSoundSourceFromFile("explosionSource", "Content/Media/Effects/Objects/Explosion4.wav"); _soundEngine.AddSoundSourceFromFile("explosionSource1", "Content/Media/Effects/Objects/Explosion1.wav"); _soundEngine.AddSoundSourceFromFile("explosionSource2", "Content/Media/Effects/Objects/Explosion2.wav"); _soundEngine.AddSoundSourceFromFile("explosionSource3", "Content/Media/Effects/Objects/Explosion3.wav"); _soundEngine.AddSoundSourceFromFile("astexplosionSource1", "Content/Media/Effects/Objects/ExplosionAst1.wav"); _soundEngine.AddSoundSourceFromFile("astexplosionSource2", "Content/Media/Effects/Objects/ExplosionAst2.wav"); _soundEngine.AddSoundSourceFromFile("astexplosionSource3", "Content/Media/Effects/Objects/ExplosionAst3.wav"); _soundEngine.AddSoundSourceFromFile("hitSound", "Content/Media/Effects/Objects/GetHitShips.wav"); //Global.Music = _soundEngine.Play2D("explosionSource3", Global.MusicVolume / 10, false); captainDialog.LoadContent(); captain.LoadContent("Images/captain", 4); // X = left/right _soundEngine.setListenerPosToCameraTarget(); var pos = Global.Camera.Target; Global.Music = _soundEngine.Play3D("explosionSource3", Global.MusicVolume / 10, Global.Camera.Target, false); }