36 animated(
const std::chrono::milliseconds& start_time = std::chrono::milliseconds{0});
60 if(
start_tick_ != std::chrono::steady_clock::time_point{}) {
69 std::chrono::steady_clock::time_point
time_to_tick(
const std::chrono::milliseconds& animation_time)
const;
70 std::chrono::milliseconds
tick_to_time(
const std::chrono::steady_clock::time_point& animation_tick)
const;
std::chrono::steady_clock::time_point get_current_animation_tick()
void new_animation_frame()
std::chrono::milliseconds get_animation_time_potential() const
const T & get_first_frame() const
std::chrono::milliseconds tick_to_time(const std::chrono::steady_clock::time_point &animation_tick) const
const T & get_frame(std::size_t n) const
std::chrono::steady_clock::time_point start_tick_
animated(const anim_description &cfg, const std::chrono::milliseconds &start_time=std::chrono::milliseconds{0}, bool force_change=false)
std::vector< frame > frames_
std::chrono::milliseconds get_begin_time() const
void start_animation(const std::chrono::milliseconds &start_time, bool cycles=false)
Starts an animation cycle.
std::chrono::milliseconds get_current_frame_begin_time() const
virtual ~animated()=default
std::chrono::milliseconds get_animation_time() const
std::chrono::steady_clock::time_point last_update_tick_
std::chrono::milliseconds max_animation_time_
std::pair< std::chrono::milliseconds, T > frame_description
void set_max_animation_time(const std::chrono::milliseconds &time)
bool animation_finished_potential() const
void add_frame(const std::chrono::milliseconds &duration, const T &value, bool force_change=false)
Adds a frame to an animation.
std::chrono::milliseconds get_current_frame_duration() const
void update_last_draw_time(double acceleration=0)
std::vector< frame_description > anim_description
void set_end_time(const std::chrono::milliseconds &ending_time)
const T & get_last_frame() const
bool does_not_change() const
bool animation_finished() const
Returns true if the current animation was finished.
std::chrono::milliseconds starting_frame_time_
void remove_frames_until(const std::chrono::milliseconds &starting_time)
std::chrono::steady_clock::time_point time_to_tick(const std::chrono::milliseconds &animation_time) const
const T & get_current_frame() const
std::size_t get_frames_count() const
void set_begin_time(const std::chrono::milliseconds &new_begin_time)
std::chrono::milliseconds get_animation_duration() const
static const T void_value_
std::chrono::milliseconds get_end_time() const
std::chrono::milliseconds get_current_frame_time() const
std::chrono::milliseconds get_current_frame_end_time() const
animated(const std::chrono::milliseconds &start_time=std::chrono::milliseconds{0})
void set_animation_time(const std::chrono::milliseconds &time)
std::chrono::milliseconds duration_
std::chrono::milliseconds start_time_
static map_location::direction n