Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
compass.c
Go to the documentation of this file.
1
class
Compass
: ItemCompass
2
{
3
protected
ref
OpenableBehaviour
m_Openable;
4
5
void
Compass
()
6
{
7
m_Openable =
new
OpenableBehaviour
(
false
);
8
9
RegisterNetSyncVariableBool(
"m_Openable.m_IsOpened"
);
10
11
UpdateVisualState();
12
}
13
14
override
void
Open()
15
{
16
m_Openable.Open();
17
SetSynchDirty();
18
19
UpdateVisualState();
20
}
21
22
override
void
Close()
23
{
24
m_Openable.Close();
25
SetSynchDirty();
26
27
UpdateVisualState();
28
}
29
30
override
bool
IsOpen()
31
{
32
return
m_Openable.IsOpened();
33
}
34
35
protected
void
UpdateVisualState()
36
{
37
if
( IsOpen() )
38
{
39
SetAnimationPhase(
"cover"
, 1.0);
40
}
41
else
42
{
43
SetAnimationPhase(
"cover"
, 0.0);
44
}
45
}
46
47
override
void
OnVariablesSynchronized()
48
{
49
super.OnVariablesSynchronized();
50
51
UpdateVisualState();
52
}
53
54
override
void
SetActions()
55
{
56
super.SetActions();
57
58
AddAction
(
ActionOpen
);
59
AddAction
(
ActionClose
);
60
AddAction
(
ActionViewCompass
);
61
}
62
}
ActionViewCompass
Definition:
actionviewcompass.c:24
Compass
Definition:
compass.c:1
ActionOpen
Definition:
actionopen.c:1
AddAction
void AddAction(typename actionName)
Definition:
advancedcommunication.c:86
OpenableBehaviour
Definition:
openablebehaviour.c:1
ActionClose
Definition:
actionclose.c:1
DAYZ
scripts_v1.24.157551
scripts
world
entities
itembase
compass.c
Generated by
1.8.17