PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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>. Based on sinus transition.
 
float GetValue ()
 Returns actual animated value.
 
float GetTargetValue ()
 Returns target value. While AnimateLoop returns angle of cycle in radians.
 
void SetValue (float val)
 Sets both value and target value.
 
bool IsRunning ()
 
void Tick (float timeslice)
 Ticks the timer, is called by timer subsystem.
 

Private Attributes

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

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

References m_active, m_loop, m_target_value, and m_time.

Referenced by MainMenuButtonEffect::OnFocus(), MainMenuButtonEffect::OnFocusLost(), HoverEffect::OnMouseEnter(), and HoverEffect::OnMouseLeave().

◆ 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)

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

Referenced by Bouncer::OnWidgetScriptInit(), RadialProgressBar::OnWidgetScriptInit(), and Rotator::OnWidgetScriptInit().

◆ GetTargetValue()

float GetTargetValue ( )
inlineprivate

Returns target value. While AnimateLoop returns angle of cycle in radians.

References m_target_value.

Referenced by Rotator::Update(), and RadialProgressBar::UpdateChild().

◆ GetValue()

float GetValue ( )
inlineprivate

Returns actual animated value.

References m_value.

Referenced by Bouncer::Update(), HoverEffect::Update(), and MainMenuButtonEffect::Update().

◆ IsRunning()

bool IsRunning ( )
inlineprivate

◆ SetValue()

void SetValue ( float  val)
inlineprivate

Sets both value and target value.

References m_target_value, and m_value.

◆ Tick()

void Tick ( float  timeslice)
inlineprivate

Ticks the timer, is called by timer subsystem.

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

Referenced by MainMenuButtonEffect::Update(), and RadialProgressBar::Update().

Field Documentation

◆ m_active

private bool m_active = false
private

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

◆ m_loop

private bool m_loop = false
private

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

◆ m_target_value

private float m_target_value = 0
private

◆ m_time

private float m_time = 0
private

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

◆ m_value

private float m_value = 0
private

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


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