DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
Land_Radio_PanelPAS.c
См. документацию.
1class Land_Radio_PanelPAS extends PASBroadcaster
2{
3 //Sounds
4 const string SOUND_PAS_TURN_ON = "pastransmitter_turnon_SoundSet";
5 const string SOUND_PAS_TURN_OFF = "pastransmitter_turnoff_SoundSet";
6 const string SOUND_PAS_TURNED_ON = "pastransmitter_staticnoise_SoundSet";
7
10
11 //--- BASE
12 override bool IsStaticTransmitter()
13 {
14 return true;
15 }
16
17 override bool DisableVicinityIcon()
18 {
19 return true;
20 }
21
22 //--- POWER EVENTS
23 override void OnSwitchOn()
24 {
25 super.OnSwitchOn();
26
27 if ( !GetCompEM().CanWork() )
28 {
29 GetCompEM().SwitchOff();
30 }
31
32 //sound
34 }
35
36 override void OnSwitchOff()
37 {
38 super.OnSwitchOff();
39
40 //sound
42 }
43
44 override void OnWorkStart()
45 {
46 super.OnWorkStart();
47
48 //turn off device
49 SwitchOn ( true ); // start send/receive voice
50
51 //sound
53 }
54
55 override void OnWorkStop()
56 {
57 super.OnWorkStop();
58
59 //turn off device
60 SwitchOn ( false ); // stop send/receive voice
61
62 //sound
64 }
65
66 //================================================================
67 // SOUNDS
68 //================================================================
69 //Static noise when the radio is turned on
70 protected void SoundTurnedOnNoiseStart()
71 {
72 PlaySoundSetLoop( m_SoundLoop, SOUND_PAS_TURNED_ON, 1.0, 1.0 );
73 }
74
75 protected void SoundTurnedOnNoiseStop()
76 {
77 StopSoundSet( m_SoundLoop );
78 }
79
80 protected void SoundTurnOn()
81 {
82 PlaySoundSet( m_Sound, SOUND_PAS_TURN_ON, 0, 0 );
83 }
84
85 protected void SoundTurnOff()
86 {
87 PlaySoundSet( m_Sound, SOUND_PAS_TURN_OFF, 0, 0 );
88 }
89}
Wrapper class for managing sound through SEffectManager.
Определения EffectSound.c:5
void SoundTurnedOnNoiseStop()
Определения Land_Radio_PanelPAS.c:75
override void OnWorkStart()
Определения Land_Radio_PanelPAS.c:44
const string SOUND_PAS_TURN_ON
Определения Land_Radio_PanelPAS.c:4
override bool DisableVicinityIcon()
Определения Land_Radio_PanelPAS.c:17
void SoundTurnOn()
Определения Land_Radio_PanelPAS.c:80
void SoundTurnedOnNoiseStart()
Определения Land_Radio_PanelPAS.c:70
EffectSound m_Sound
Определения Land_Radio_PanelPAS.c:8
EffectSound m_SoundLoop
Определения Land_Radio_PanelPAS.c:9
override bool IsStaticTransmitter()
Определения Land_Radio_PanelPAS.c:12
const string SOUND_PAS_TURNED_ON
Определения Land_Radio_PanelPAS.c:6
override void OnSwitchOn()
Определения Land_Radio_PanelPAS.c:23
const string SOUND_PAS_TURN_OFF
Определения Land_Radio_PanelPAS.c:5
override void OnWorkStop()
Определения Land_Radio_PanelPAS.c:55
void SoundTurnOff()
Определения Land_Radio_PanelPAS.c:85
override void OnSwitchOff()
Определения Land_Radio_PanelPAS.c:36