Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
AnimatorTimer Class Reference

Private Member Functions

void Animate (float val, float speed=1.0)
 Starts animate value until value reaches target value.
void AnimateLoop (float speed=1.0)
 Starts infinite animation loop <-1,1>.
float GetTargetValue ()
 Returns target value.
float GetValue ()
 Returns actual animated value.
bool IsRunning ()
void SetValue (float val)
 Sets both value and target value.
void Tick (float timeslice)
 Ticks the timer, is called by timer subsystem.

Private Attributes

bool m_active = false
bool m_loop = false
float m_target_value = 0
float m_time = 0
float m_value = 0

Detailed Description

Definition at line 746 of file tools.c.

Member Function Documentation

◆ Animate()

void Animate ( float val,
float speed = 1.0 )
inlineprivate

Starts animate value until value reaches target value.

Parameters
valfloat target value
speedfloat speed of animating, units per second

Definition at line 759 of file tools.c.

References m_active, m_loop, m_target_value, and m_time.

◆ AnimateLoop()

void AnimateLoop ( float speed = 1.0)
inlineprivate

Starts infinite animation loop <-1,1>.

Based on sinus transition.

Parameters
speedfloat speed of animating , cycles per second (1.0 means one 360 degree sinus cycle per second: 0..1..0..-1..0)

Definition at line 771 of file tools.c.

References m_active, m_loop, m_target_value, m_time, and m_value.

◆ GetTargetValue()

float GetTargetValue ( )
inlineprivate

Returns target value.

While AnimateLoop returns angle of cycle in radians.

Definition at line 790 of file tools.c.

References m_target_value.

◆ GetValue()

float GetValue ( )
inlineprivate

Returns actual animated value.

Definition at line 783 of file tools.c.

References m_value.

◆ IsRunning()

bool IsRunning ( )
inlineprivate

Definition at line 802 of file tools.c.

References m_active.

◆ SetValue()

void SetValue ( float val)
inlineprivate

Sets both value and target value.

Definition at line 797 of file tools.c.

References m_target_value, and m_value.

◆ Tick()

void Tick ( float timeslice)
inlineprivate

Ticks the timer, is called by timer subsystem.

Definition at line 809 of file tools.c.

References Math::AbsFloat(), m_active, m_loop, m_target_value, m_time, m_value, Math::PI2, and Math::Sin().

Field Documentation

◆ m_active

bool m_active = false
private

Definition at line 748 of file tools.c.

Referenced by Animate(), AnimateLoop(), IsRunning(), and Tick().

◆ m_loop

bool m_loop = false
private

Definition at line 749 of file tools.c.

Referenced by Animate(), AnimateLoop(), and Tick().

◆ m_target_value

float m_target_value = 0
private

Definition at line 750 of file tools.c.

Referenced by Animate(), AnimateLoop(), GetTargetValue(), SetValue(), and Tick().

◆ m_time

float m_time = 0
private

Definition at line 752 of file tools.c.

Referenced by Animate(), AnimateLoop(), and Tick().

◆ m_value

float m_value = 0
private

Definition at line 751 of file tools.c.

Referenced by AnimateLoop(), GetValue(), SetValue(), and Tick().


The documentation for this class was generated from the following file:
  • F:/Games/Dayz/scripts/3_game/tools/tools.c