jumpevents.c 968 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. class JumpEventsBase extends PlayerSoundEventBase
  2. {
  3. override bool HasPriorityOverCurrent(PlayerBase player, EPlayerSoundEventID other_state_id, EPlayerSoundEventType type_other)
  4. {
  5. return true;
  6. }
  7. override bool CanPlay(PlayerBase player)
  8. {
  9. if( !super.CanPlay(player) )
  10. {
  11. return false;
  12. }
  13. return true;
  14. }
  15. override void OnPlay(PlayerBase player)
  16. {
  17. super.OnPlay(player);
  18. if( player.CanSpawnBreathVaporEffect() )
  19. player.SpawnBreathVaporEffect();
  20. }
  21. override void OnEnd()
  22. {
  23. super.OnEnd();
  24. //m_Player.GetStaminaSoundHandlerClient().PostponeStamina(1000);
  25. if(m_Player)
  26. StaminaSoundHandlerClient.Cast(m_Player.m_PlayerSoundManagerClient.GetHandler(eSoundHandlers.STAMINA)).PostponeStamina(1300);
  27. }
  28. }
  29. class JumpSoundEvent extends JumpEventsBase
  30. {
  31. void JumpSoundEvent()
  32. {
  33. m_HasPriorityOverTypes = -1;//-1 for all
  34. m_Type = EPlayerSoundEventType.GENERAL;
  35. m_ID = EPlayerSoundEventID.JUMP;
  36. m_SoundVoiceAnimEventClassID = 18;
  37. }
  38. }