DayZ
1.24
Loading...
Searching...
No Matches
Rotator.c
Go to the documentation of this file.
1
// -----------------------------------------------------------
2
class
Rotator
3
{
4
reference
float
speed
;
5
6
protected
Widget
m_root
;
7
protected
ref
AnimatorTimer
m_anim
;
8
9
// -----------------------------------------------------------
10
void
Rotator
()
11
{
12
m_anim
=
new
AnimatorTimer
();
13
}
14
15
// -----------------------------------------------------------
16
protected
void
Update
()
17
{
18
if
(
m_root
)
19
m_root
.SetRotation(0, 0,
m_anim
.GetTargetValue() *
Math
.
RAD2DEG
);
20
}
21
22
// -----------------------------------------------------------
23
void
OnWidgetScriptInit
(
Widget
w
)
24
{
25
m_root
=
w
;
26
m_anim
.AnimateLoop(
speed
);
27
}
28
};
AnimatorTimer
Definition
tools.c:705
Math
Definition
EnMath.c:7
Param3
Definition
EntityAI.c:95
Rotator
Definition
Rotator.c:3
Rotator::m_anim
ref AnimatorTimer m_anim
Definition
Rotator.c:7
Rotator::Rotator
void Rotator()
Definition
Rotator.c:10
Rotator::OnWidgetScriptInit
void OnWidgetScriptInit(Widget w)
Definition
Rotator.c:23
Rotator::speed
reference float speed
Definition
Rotator.c:4
Rotator::m_root
Widget m_root
Definition
Rotator.c:6
Rotator::Update
void Update()
Definition
Rotator.c:16
Widget
Definition
EnWidgets.c:190
Math::RAD2DEG
static const float RAD2DEG
Definition
EnMath.c:16
scripts
3_Game
GUI
Effects
Rotator.c
Generated by
1.10.0