DayZ 1.24
Loading...
Searching...
No Matches
Rotator.c
Go to the documentation of this file.
1// -----------------------------------------------------------
2class Rotator
3{
5
6 protected Widget m_root;
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 // -----------------------------------------------------------
24 {
25 m_root = w;
26 m_anim.AnimateLoop(speed);
27 }
28};
Definition EnMath.c:7
ref AnimatorTimer m_anim
Definition Rotator.c:7
void Rotator()
Definition Rotator.c:10
void OnWidgetScriptInit(Widget w)
Definition Rotator.c:23
reference float speed
Definition Rotator.c:4
Widget m_root
Definition Rotator.c:6
void Update()
Definition Rotator.c:16
static const float RAD2DEG
Definition EnMath.c:16