Exemple #1
0
 public override void free()
 {
     DSound.unloadSound(ref missileLaunchSound);
     DSound.unloadSound(ref missileSound);
     DSound.unloadSound(ref missileHitSound);
     DSound.unloadSound(ref missileExplodeSound);
 }
Exemple #2
0
 public override void free()
 {
     base.free();
     DSound.unloadSound(ref launchSound);
     DSound.unloadSound(ref missileSound);
     DSound.unloadSound(ref hitSound);
 }
Exemple #3
0
 public override void freeResources()
 {
     base.freeResources();
     DSound.unloadSound(ref engine);
     DSound.unloadSound(ref startChargeSound);
     DSound.unloadSound(ref chargeSound);
     DSound.unloadSound(ref endChargeSound);
     DSound.unloadSound(ref taunt);
 }
		public void playDestroy(bool isAI)
		{
			bool isAITemp = this.isAI;
			this.isAI = isAI;
			if (destroySound != null)
				DSound.unloadSound(ref destroySound);
			destroySound = loadSound((damage <= 0) ? destroyFile : hitFile);
			playSound(destroySound, true, false);
			this.isAI = isAITemp;
		}
Exemple #5
0
 private static void cleanUp(ref SecondarySoundBuffer[] sounds)
 {
     if (sounds == null)
     {
         return;
     }
     for (int i = 0; i < sounds.Length; i++)
     {
         DSound.unloadSound(ref sounds[i]);
     }
     sounds = null;
 }
 public virtual void freeResources()
 {
     if (ctrlVolume != null)
     {
         SecondarySoundBuffer b = null;
         for (int i = 0; i < ctrlVolume.Count; i++)
         {
             b = ctrlVolume[i];
             DSound.unloadSound(ref b);
         }
         ctrlVolume.Clear();
         volumes.Clear();
         looping.Clear();
     }
     isMuted = false;
 }
Exemple #7
0
 private static void releaseConnection()
 {
     if (client.Connected)
     {
         client.GetStream().Close();
         client.Close();
         client = null;
     }
     DSound.unloadSound(ref chatEnterSound);
     DSound.unloadSound(ref chatLeaveSound);
     DSound.unloadSound(ref privateMessageSound);
     DSound.unloadSound(ref chatSound);
     DSound.unloadSound(ref serverMessageSound);
     chatMessages.Clear();
     chatPointer = 0;
     if (log)
     {
         theFile.Close();
     }
     Common.mainGUI.leaveChat();
 }
Exemple #8
0
 /// <summary>
 /// Turns strafing on or off. If strafing is on, the gun sound is looped and
 /// use() will fire off ten shots. Else it will stop playing the strafing sound. So it will call this method to start the gun sound and let fly ten.
 /// </summary>
 /// <param name="status">True to turn strafing on or leave it on, false to turn it off or leave it off.</param>
 public void setStrafe(bool status)
 {
     if (status)
     {
         if (gunSound == null)
         {
             gunSound = creator.loadSound(creator.soundPath + "gun1.wav");
         }
         creator.playSound(gunSound, false, true);
         if (isValidLock() && getLockedTarget() is Aircraft)
         {
             ((Aircraft)getLockedTarget()).notifyOf(Notifications.strafe, inFiringRange());
         }
     }
     else
     {
         if (creator.isSender())
         {
             stoppedStrafe = false;
         }
         DSound.unloadSound(ref gunSound);
     }
 }
Exemple #9
0
        }     //property

        public void freeResources()
        {
            setStrafe(false);
            DSound.unloadSound(ref lockSound);
            DSound.unloadSound(ref lockAlertSound);
        }
Exemple #10
0
 public override void free()
 {
     DSound.unloadSound(ref gunHitSound);
 }
 public override void free()
 {
     DSound.unloadSound(ref cannonLaunch);
 }
        private static void showDevices()
        {
            InputDeviceCollection dList = null;
            ////holds keyboards
            InputDeviceCollection dList2 = null;

            ////holds game controllers
            dList = DirectInput.GetDevices(DeviceClass.Keyboard, DeviceEnumerationFlags.AttachedOnly);
            ////enumerator for keyboards
            dList2 = DirectInput.GetDevices(DeviceClass.GameController, DeviceEnumerationFlags.AttachedOnly);
            ////enumerator for all game controllers

            DeviceInstance[] devList = null;
            devList = (DeviceInstance[])(Array.CreateInstance(typeof(DeviceInstance),
                                                              (dList2 == null) ? 1 : 2));
            foreach (DeviceInstance d in dList)
            {
                devList[0] = d;
                break;
            }
            if (dList2 != null)
            {
                foreach (DeviceInstance d in dList2)
                {
                    devList[1] = d;
                    break;
                }
            }
            string[] devListSTR = new string[(dList2 == null) ? 1 : 2];
            devListSTR[0] = "mainmenu_5_1_1.wav";
            if (dList2 != null)
            {
                devListSTR[1] = "mainmenu_5_1_2.wav";
            }
            int mindex = Common.sVGenerateMenu(null, devListSTR);

            if (mindex == -1)
            {
                return;
            }
            ////exit menu
            if (mindex > 0)
            {
                ////chose joystick
                ////so config it
                dxInput.DInputInit(Common.mainGUI.Handle, devList[mindex].InstanceGuid);
                configureJS(devList[mindex].InstanceGuid);
                KeyMap.readFromFile();
                SecondarySoundBuffer confirm = DSound.LoadSound(DSound.NSoundPath + "\\gce.wav");
                DSound.PlaySound(confirm, true, false);
                while (DSound.isPlaying(confirm))
                {
                    Thread.Sleep(10);
                }
                DSound.unloadSound(confirm);
                confirm = null;
            }
            else
            {
                if (dxInput.JSDevice != null)
                {
                    dxInput.JSDevice.Unacquire();
                    dxInput.JSDevice = null;
                }         //if !null
                KeyMap.readFromFile();
            }             //if chose keyboard
        }
Exemple #13
0
 public override void cleanUp()
 {
     if (missiles != null)
     {
         foreach (PersonMissile p in missiles)
         {
             if (p == null)
             {
                 continue;
             }
             p.cleanUp();
         }
     }
     if (stepSound != null)
     {
         for (int i = 0; i < stepSound.Length; i++)
         {
             DSound.unloadSound(ref stepSound[i]);
         }
     }
     if (swingSound != null)
     {
         for (int i = 0; i < swingSound.Length; i++)
         {
             DSound.unloadSound(ref swingSound[i]);
         }
     }
     if (swingVoice != null)
     {
         for (int i = 0; i < swingVoice.Length; i++)
         {
             DSound.unloadSound(ref swingVoice[i]);
         }
     }
     if (punchedSound != null)
     {
         for (int i = 0; i < punchedSound.Length; i++)
         {
             DSound.unloadSound(ref punchedSound[i]);
         }
     }
     if (gruntSound != null)
     {
         for (int i = 0; i < gruntSound.Length; i++)
         {
             DSound.unloadSound(ref gruntSound[i]);
         }
     }
     if (tossSound != null)
     {
         for (int i = 0; i < tossSound.Length; i++)
         {
             DSound.unloadSound(ref tossSound[i]);
         }
     }
     if (tossVoice != null)
     {
         for (int i = 0; i < tossVoice.Length; i++)
         {
             DSound.unloadSound(ref tossVoice[i]);
         }
     }
     DSound.unloadSound(ref throwSound);
     DSound.unloadSound(ref impactSound);
     DSound.unloadSound(ref hitSound);
     DSound.unloadSound(ref blockSound);
     DSound.unloadSound(ref crashSound);
     DSound.unloadSound(ref lastStepSound);
     DSound.unloadSound(ref stunSound);
     DSound.unloadSound(ref shootSound);
     DSound.unloadSound(ref lockSound);
 }
 public void cleanUp()
 {
     DSound.unloadSound(ref moveSound);
     DSound.unloadSound(ref explodeSound);
 }
Exemple #15
0
 ////masked method for dSound
 ////.unloadSound method
 public void unloadSound(ExtendedAudioBuffer s)
 {
     DSound.unloadSound(ref s);
 }
Exemple #16
0
 public override void free()
 {
     DSound.unloadSound(ref launch);
     DSound.unloadSound(ref Hit);
     DSound.unloadSound(ref moveSound);
 }
Exemple #17
0
 public override void freeResources()
 {
     base.freeResources();
     DSound.unloadSound(ref moveSound);
 }
Exemple #18
0
 public virtual void free()
 {
     DSound.unloadSound(ref expl);
 }
Exemple #19
0
 public override void cleanUp()
 {
     DSound.unloadSound(ref destroySound);
     DSound.unloadSound(ref crashSound);
 }
Exemple #20
0
 ////masked method for dSound
 ////.unloadSound method
 public void unloadSound(SecondarySoundBuffer s)
 {
     DSound.unloadSound(ref s);
 }