Exemplo n.º 1
0
        //#################################
        // LoadContent
        //#################################
        public override void LoadContent()
        {
            _stationSymbol = new UIItem();
            _stationSymbol.LoadContent("Images/station_icon", 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();
            _planet.LoadContent();
            _sphere.LoadContent();
            _ui.LoadContent(_droneFleet);
            _frame.LoadContent();
            tutorialDialog.LoadContent();
            captainDialog.LoadContent();
            captain.LoadContent("Images/captain", 4);
            _asteroidField.LoadContent();
            //Sounds

            _engine = new ISpaceSoundEngine(SoundOutputDriver.AutoDetect, SoundEngineOptionFlag.LoadPlugins | SoundEngineOptionFlag.MultiThreaded | SoundEngineOptionFlag.MuteIfNotFocused | SoundEngineOptionFlag.Use3DBuffers);

            _explosionSource  = _engine.AddSoundSourceFromFile("Content/Media/Effects/Explosion.wav", StreamMode.AutoDetect, true);
            _explosionSource1 = _engine.AddSoundSourceFromFile("Content/Media/Effects/Objects/Explosion1.wav", StreamMode.AutoDetect, true);
            _explosionSource2 = _engine.AddSoundSourceFromFile("Content/Media/Effects/Objects/Explosion2.wav", StreamMode.AutoDetect, true);
            _explosionSource3 = _engine.AddSoundSourceFromFile("Content/Media/Effects/Objects/Explosion3.wav", StreamMode.AutoDetect, true);

            _openShop = _engine.AddSoundSourceFromFile("Content/Media/Effects/OkClick.wav", StreamMode.AutoDetect, true);


            Global.HighScorePoints = 0;
            Global.Money           = 0;
            Global.DroneDmg        = 10;
            Global.NumberOfRockets = 1;
            Global.SpeakerVolume   = 2;
        }
Exemplo n.º 2
0
        //#################################
        // Load Content
        //#################################
        public override void LoadContent()
        {
            SoundEngine = new ISpaceSoundEngine(SoundOutputDriver.AutoDetect, SoundEngineOptionFlag.LoadPlugins | SoundEngineOptionFlag.MultiThreaded | SoundEngineOptionFlag.MuteIfNotFocused | SoundEngineOptionFlag.Use3DBuffers);
            SoundEngine.AddSoundSourceFromFile("MenuAcceptSound", "Content/Media/Effects/MenuPointAccept.wav");
            SoundEngine.AddSoundSourceFromFile("MenuDenieSound", "Content/Media/Effects/MenuPointDenie.wav");
            SoundEngine.AddSoundSourceFromFile("OkClick", "Content/Media/Effects/OkClick.wav");
            SoundEngine.AddSoundSourceFromFile("GoBack", "Content/Media/Effects/GoBack2.wav");
            SoundEngine.AddSoundSourceFromFile("OpenMenu", "Content/Media/Effects/OpenShop.wav");

            _frame.LoadContent();
        }
Exemplo n.º 3
0
        //#################################
        // LoadContent - Function
        //#################################
        public override void LoadContent()
        {
            //UI
            Labels.Add(new Label("Fragments: ", 50, Global.GraphicsManager.PreferredBackBufferHeight - 50, Color.White));
            _itemDialog.LoadContent();
            _levelDialog.LoadContent();
            _priceDialog.LoadContent();
            _frame.LoadContent();

            //Sound
            SoundEngine = new ISpaceSoundEngine(SoundOutputDriver.AutoDetect, SoundEngineOptionFlag.LoadPlugins | SoundEngineOptionFlag.MultiThreaded | SoundEngineOptionFlag.MuteIfNotFocused | SoundEngineOptionFlag.Use3DBuffers);

            SoundEngine.AddSoundSourceFromFile("MenuAcceptSound", "Content/Media/Effects/Blip_Select.wav");
            SoundEngine.AddSoundSourceFromFile("OkClick", "Content/Media/Effects/MenuPointAccept.wav");
            SoundEngine.AddSoundSourceFromFile("MenuDenieSound", "Content/Media/Effects/MenuPointDenie.wav");
            SoundEngine.AddSoundSourceFromFile("GoBack", "Content/Media/Effects/GoBack2.wav");
            SoundEngine.AddSoundSourceFromFile("OpenMenu", "Content/Media/Effects/OpenShop.wav");
        }
Exemplo n.º 4
0
        //#################################
        // 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);
        }