DayZ 1.24
Loading...
Searching...
No Matches
AnniversaryMusicSource.c
Go to the documentation of this file.
7
8class AnniversaryMusicSource : Building
9{
10 private const string SOUND_INTENSE = "AnniversaryMusic_Intense_SoundSet";
11 private const string SOUND_LIGHT = "AnniversaryMusic_Light_SoundSet";
12
13#ifndef SERVER
16#endif
17
18 protected int m_MusicState;
19 protected int m_MusicStateLocal;
20
22 {
25
26 RegisterNetSyncVariableInt("m_MusicState", 0, EnumTools.GetEnumSize(EAnniversaryMusicStates));
27 }
28
29 override void EEDelete(EntityAI parent)
30 {
31 super.EEDelete(parent);
32
33#ifndef SERVER
36
39#endif
40 }
41
43 {
44 super.OnVariablesSynchronized();
45
47 {
49#ifndef SERVER
51#endif
52 }
53 }
54
56 {
57#ifndef SERVER
60
63#endif
64
65 switch (m_MusicState)
66 {
67 case EAnniversaryMusicStates.LIGHT:
68 PlayLight();
69 break;
70
71 case EAnniversaryMusicStates.INTENSE:
73 break;
74
75 default:
77 break;
78 }
79 }
80
81 //just sync
83 {
85 SetSynchDirty();
86 }
87
88 //just sync
90 {
92 SetSynchDirty();
93 }
94
95 //just sync
97 {
99 SetSynchDirty();
100 }
101
103 {
104#ifndef SERVER
107#endif
108 }
109
111 {
112#ifndef SERVER
115#endif
116 }
117
119 {
120#ifndef SERVER
123#endif
124 }
125}
void AnniversaryMusicSource()
void PlayIntense()
void SetLightServer()
void StopAllMusic()
int m_MusicState
EffectSound m_IntenseAmbientSound
enum EAnniversaryMusicStates SOUND_INTENSE
int m_MusicStateLocal
const string SOUND_LIGHT
void SetInvalidServer()
void UpdateMusic()
void PlayLight()
EAnniversaryMusicStates
override void OnVariablesSynchronized()
void SetIntenseServer()
EffectSound m_LightAmbientSound
override void EEDelete(EntityAI parent)
class JsonUndergroundAreaTriggerData GetPosition
Wrapper class for managing sound through SEffectManager.
Definition EffectSound.c:5
bool SoundPlay()
Plays sound.
void SoundStop()
Stops sound.
static int GetEnumSize(typename e)
Return amount of values in enum.
Definition EnConvert.c:620
Manager class for managing Effect (EffectParticle, EffectSound)
static EffectSound CreateSound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false, bool enviroment=false)
Create an EffectSound.
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.