replacesoundeventbase.c 943 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. class ReplaceSoundEventBase
  2. {
  3. protected ESoundEventType m_EventType;
  4. protected EReplaceSoundEventID m_ID;
  5. protected int m_SoundAnimEventClassID;
  6. protected int m_ReplacedSoundAnimID;
  7. protected string m_UserString;
  8. protected PlayerBase m_Player;
  9. ESoundEventType GetSoundEventType()
  10. {
  11. return m_EventType;
  12. }
  13. EReplaceSoundEventID GetSoundEventID()
  14. {
  15. return m_ID;
  16. }
  17. int GetSoundAnimEventClassID()
  18. {
  19. return m_SoundAnimEventClassID;
  20. }
  21. void Init(PlayerBase player)
  22. {
  23. m_Player = player;
  24. }
  25. bool Play()
  26. {
  27. SelectSoundID();
  28. switch (m_EventType)
  29. {
  30. case ESoundEventType.SOUND_COMMON:
  31. m_Player.ProcessSoundEvent("", m_UserString, m_ReplacedSoundAnimID);
  32. break;
  33. case ESoundEventType.SOUND_WEAPON:
  34. m_Player.ProcessWeaponEvent("", m_UserString, m_ReplacedSoundAnimID);
  35. break;
  36. default:
  37. break;
  38. }
  39. return true;
  40. }
  41. protected void SelectSoundID();
  42. }