DayZ
1.24
Loading...
Searching...
No Matches
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
SetAnimationPhase(
"cover"
, 1.0);
39
else
40
SetAnimationPhase(
"cover"
, 0.0);
41
}
42
43
override
void
OnVariablesSynchronized
()
44
{
45
super
.OnVariablesSynchronized();
46
47
UpdateVisualState
();
48
}
49
50
override
void
SetActions
()
51
{
52
super
.SetActions();
53
54
AddAction
(
ActionOpen
);
55
AddAction
(
ActionClose
);
56
AddAction
(
ActionViewCompass
);
57
}
58
}
AddAction
void AddAction(typename actionName)
Definition
AdvancedCommunication.c:212
ActionClose
Definition
ActionClose.c:2
ActionOpen
Definition
ActionOpen.c:2
ActionViewCompass
Definition
ActionViewCompass.c:25
Compass
Definition
Compass.c:2
Compass::IsOpen
override bool IsOpen()
Definition
Compass.c:30
Compass::OnVariablesSynchronized
override void OnVariablesSynchronized()
Definition
Compass.c:43
Compass::Open
override void Open()
Definition
Compass.c:14
Compass::UpdateVisualState
void UpdateVisualState()
Definition
Compass.c:35
Compass::m_Openable
ref OpenableBehaviour m_Openable
Definition
Compass.c:3
Compass::Close
override void Close()
Definition
Compass.c:22
Compass::Compass
void Compass()
Definition
Compass.c:5
Compass::SetActions
override void SetActions()
Definition
Compass.c:50
OpenableBehaviour
Definition
OpenableBehaviour.c:2
Param3
Definition
EntityAI.c:95
scripts
4_World
Entities
ItemBase
Compass.c
Generated by
1.10.0