Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
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
{
20
m_root
.SetRotation(0, 0,
m_anim
.GetTargetValue() *
Math
.
RAD2DEG
);
21
}
22
}
23
24
// -----------------------------------------------------------
25
void
OnWidgetScriptInit
(
Widget
w)
26
{
27
m_root
= w;
28
m_anim
.AnimateLoop(
speed
);
29
}
30
};
AnimatorTimer
Definition
tools.c:747
Math
Definition
enmath.c:7
Rotator::m_root
Widget m_root
Definition
rotator.c:6
Rotator::speed
reference float speed
Definition
rotator.c:4
Rotator::OnWidgetScriptInit
void OnWidgetScriptInit(Widget w)
Definition
rotator.c:25
Rotator::m_anim
ref AnimatorTimer m_anim
Definition
rotator.c:7
Rotator::Update
void Update()
Definition
rotator.c:16
Rotator::Rotator
void Rotator()
Definition
rotator.c:10
Widget
Definition
enwidgets.c:190
Math::RAD2DEG
static const float RAD2DEG
Definition
enmath.c:16
Games
Dayz
scripts
3_game
gui
effects
rotator.c
Generated by
1.17.0