DayZ 1.24
Loading...
Searching...
No Matches
Rotator Class Reference
Collaboration diagram for Rotator:
[legend]

Protected Member Functions

void Rotator ()
 
void Update ()
 
void OnWidgetScriptInit (Widget w)
 

Protected Attributes

Widget m_root
 
ref AnimatorTimer m_anim
 

Private Attributes

reference float speed
 

Detailed Description

Definition at line 2 of file Rotator.c.

Constructor & Destructor Documentation

◆ Rotator()

void Rotator::Rotator ( )
inlineprotected

Definition at line 10 of file Rotator.c.

11 {
12 m_anim = new AnimatorTimer();
13 }
ref AnimatorTimer m_anim
Definition Rotator.c:7

References m_anim.

Member Function Documentation

◆ OnWidgetScriptInit()

void Rotator::OnWidgetScriptInit ( Widget w)
inlineprotected

Definition at line 23 of file Rotator.c.

24 {
25 m_root = w;
26 m_anim.AnimateLoop(speed);
27 }
reference float speed
Definition Rotator.c:4
Widget m_root
Definition Rotator.c:6

References m_anim, m_root, and speed.

◆ Update()

void Rotator::Update ( )
inlineprotected

Definition at line 16 of file Rotator.c.

17 {
18 if (m_root)
19 m_root.SetRotation(0, 0, m_anim.GetTargetValue() * Math.RAD2DEG);
20 }
Definition EnMath.c:7
static const float RAD2DEG
Definition EnMath.c:16

References m_anim, m_root, and Math::RAD2DEG.

Member Data Documentation

◆ m_anim

ref AnimatorTimer Rotator::m_anim
protected

Definition at line 7 of file Rotator.c.

Referenced by OnWidgetScriptInit(), Rotator(), and Update().

◆ m_root

Widget Rotator::m_root
protected

Definition at line 6 of file Rotator.c.

Referenced by OnWidgetScriptInit(), and Update().

◆ speed

reference float Rotator::speed
private

Definition at line 4 of file Rotator.c.

Referenced by OnWidgetScriptInit().


The documentation for this class was generated from the following file: