Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
christmastree.c
Go to the documentation of this file.
1 class ChristmasTree extends House
2 {
3  XmasTreeLight m_TreeLight;
4  EffectSound m_AmbientSoundLoop;
5  const string LOOP_SOUND = "ChristmasMusic_SoundSet";
6 
7  void ChristmasTree()
8  {
9  if ( !GetGame().IsDedicatedServer() )
10  {
11  m_TreeLight = XmasTreeLight.Cast( ScriptedLightBase.CreateLight( XmasTreeLight, "0 0 0" ) );
12  m_TreeLight.AttachOnMemoryPoint( this, "action" );
13  }
14  }
15 
16  override void EEInit()
17  {
18  if ( !GetGame().IsDedicatedServer() )
19  {
20  PlaySoundSetLoop( m_AmbientSoundLoop, LOOP_SOUND, 0, 0 );
21  }
22  }
23 
24  override void EEDelete(EntityAI parent)
25  {
26  if ( !GetGame().IsDedicatedServer() )
27  {
28  if ( m_TreeLight )
29  m_TreeLight.Destroy();
30  if ( m_AmbientSoundLoop )
31  SEffectManager.DestroyEffect(m_AmbientSoundLoop);
32  }
33  }
34 };
35 class ChristmasTree_Green extends ChristmasTree {};
GetGame
proto native CGame GetGame()
ChristmasTree
Definition: christmastree.c:35
EEDelete
override void EEDelete(EntityAI parent)
Definition: contaminatedarea.c:69
EffectSound
Wrapper class for managing sound through SEffectManager.
Definition: effectsound.c:4
ScriptedLightBase
Definition: pointlightbase.c:1
House
Definition: crashbase.c:1
EEInit
override void EEInit()
Definition: contaminatedarea.c:27
SEffectManager
Manager class for managing Effect (EffectParticle, EffectSound)
Definition: effectmanager.c:5
EntityAI
Definition: building.c:5