DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
HungerSoundHandler.c
См. документацию.
2{
3 override void Init()
4 {
5 m_Id = eSoundHandlers.HUNGER;
6 }
7
8}
9
10//---------------------------
11// Client
12//---------------------------
13class HungerSoundHandlerClient extends HungerSoundHandlerBase
14{
15 const float SOUND_INTERVALS_LIGHT_MIN = 10;
16 const float SOUND_INTERVALS_LIGHT_MAX = 30;
19
20 override void Update()
21 {
22 if ( m_Player.GetMixedSoundStates() & eMixedSoundStates.HUNGRY )
23 {
25 }
26 }
27
29 {
30 if ( GetGame().GetTime() > m_SoundTime)
31 {
33 m_SoundTime = GetGame().GetTime() + offset_time;
34 PlaySound();
35 }
36 }
37
38 void PlaySound()
39 {
40 m_Sound = SEffectManager.PlaySoundOnObject("hungry_uni_Voice_Char_SoundSet", m_Player);
41
42 if( m_Sound )
43 {
44 m_Sound.SetAutodestroy(true);
45 }
46 else
47 {
48 Debug.LogError("Missing sounset");
49 }
50 }
51}
52
53
54//---------------------------
55// Server
56//---------------------------
57class HungerSoundHandlerServer extends HungerSoundHandlerBase
58{
59
60}
eMixedSoundStates
bits
Определения EMixedSoundStates.c:3
DayZPlayer m_Player
Определения Hand_Events.c:42
float m_SoundTime
Определения HungerSoundHandler.c:17
void PlaySound()
Определения HungerSoundHandler.c:38
class HungerSoundHandlerBase extends SoundHandlerBase SOUND_INTERVALS_LIGHT_MIN
const float SOUND_INTERVALS_LIGHT_MAX
Определения HungerSoundHandler.c:16
EffectSound m_Sound
Определения HungerSoundHandler.c:18
void ProcessSound()
Определения HungerSoundHandler.c:28
float GetTime()
Определения NotificationSystem.c:35
eSoundHandlers
Определения PlayerSoundManager.c:5
enum eStaminaZones m_Id
proto int GetTime()
returns mission time in milliseconds
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
Определения Debug.c:245
Определения Debug.c:2
Wrapper class for managing sound through SEffectManager.
Определения EffectSound.c:5
Определения EnMath.c:7
static EffectSound PlaySoundOnObject(string sound_set, Object parent_object, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
Определения EffectManager.c:247
Manager class for managing Effect (EffectParticle, EffectSound)
Определения EffectManager.c:6
override void Init()
Определения HungerSoundHandler.c:3
proto native CGame GetGame()
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Определения EnMath.c:106
override void Update()
Определения HungerSoundHandler.c:20