Пример #1
0
 /// <summary>
 /// this method should only be called once for one object
 /// </summary>
 /// <param name="callbackDestination">the origin of the volumeCallbackMethod </param>
 /// <param name="volumeCallbackMethod">method to call when volume is changed</param>
 public void setNewSfxCallback(object callbackDestination, soundVolumeChange volumeCallbackMethod)
 {
     sfxChangeCallbacks.Add(callbackDestination, volumeCallbackMethod);
     volumeCallbackMethod(getSfxVolume());
 }
Пример #2
0
 /// <summary>
 /// this method should only be called once for one object
 /// this method calls the volumeCallbackMethod instantly
 /// </summary>
 /// <param name="callbackDestination">the origin of the volumeCallbackMethod </param>
 /// <param name="volumeCallbackMethod">method to call when volume is changed</param>
 public void setNewMusicCallback(object callbackDestination, soundVolumeChange volumeCallbackMethod)
 {
     musicChangeCallbacks.Add(callbackDestination, volumeCallbackMethod);
     volumeCallbackMethod(musicVolume);
 }