Advertisement
Guest User

Untitled

a guest
May 20th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. using Microsoft.DirectX.DirectInput;
  2. using System.Drawing;
  3. using System.IO;
  4. using System.Windows.Forms;
  5. using TGC.Core.Sound;
  6. using TGC.Core.Text;
  7.  
  8. namespace TGC.Group.Model
  9. {
  10. public class SoundManager : TgcDirectSound
  11. {
  12. public TgcStaticSound sonidoCaminar;
  13. public TgcStaticSound sonidoFondo;
  14.  
  15. static string mediaDir;
  16.  
  17. public static SoundManager Instance;
  18.  
  19.  
  20. public static SoundManager getInstance()
  21. {
  22. if (Instance == null)
  23. {
  24. Instance = new SoundManager();
  25. }
  26. return Instance;
  27. }
  28.  
  29. public SoundManager()
  30. {
  31.  
  32.  
  33. sonidoCaminar = new TgcStaticSound();
  34. sonidoFondo = new TgcStaticSound();
  35.  
  36. sonidoFondo.loadSound("Media\\Sound\\Background.wav", DsDevice);
  37. sonidoCaminar.loadSound("Media\\Sound\\FootSteps.wav", DsDevice);
  38.  
  39. }
  40.  
  41. public void playSonidoCaminar()
  42. {
  43. sonidoCaminar.play();
  44. }
  45.  
  46. public void playSonidoFondo()
  47. {
  48. sonidoFondo.play();
  49. }
  50.  
  51. public void dispose()
  52. {
  53. sonidoFondo.dispose();
  54. sonidoCaminar.dispose();
  55. }
  56. }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement