1#include <game/bases/d_util_frame_counter.hpp>
27 play(updateRate, type);
f32 m_startFrame
Lower bound of the frame interval.
void calc()
Updates the frame counter.
FrameCounter_c()
Constructs a new frame counter.
void play(f32 updateRate, Type_e type, f32 startFrame, f32 endFrame)
Fully initializes into a valid state.
~FrameCounter_c()
Destroys the frame counter.
void init(f32 startFrame, f32 endFrame)
Initializes the frame interval.
f32 m_frame
The current frame in the interval [start, end].
bool m_finished
Whether or not the counter is finished.
Type_e m_type
Controls what happens to the frame when it reaches the target frame.
f32 m_updateRate
Controls the direction and rate at which the frame updates.
f32 m_endFrame
Upper bound of the frame interval.
Type_e
The possible behaviors after the frame counter is finished.
@ TYPE_ONETIME
Locks the frame to the target frame.
@ TYPE_LOOP
Continues counting in the same direction.
@ TYPE_OSCILLATING
Continues counting in the opposite direction.