22 size_t current_frame_index_{0};
26 : handle_(handle), frame_rate_(frame_rate) {}
32 bool finished()
const {
return current_frame_index_ >= frame_count(); }
33 bool playing()
const {
return !finished() && current_frame_index_; }
35 if (finished())
return;
36 auto c = frame_count();
virtual void update_to(float_t time)=0
更新到指定时间点
size_t current_frame_index() const
AnimationDriver & operator=(const AnimationDriver &)=delete
size_t frame_count() const
~AnimationDriver()=default
AnimationDriver & operator=(AnimationDriver &&)=delete
float_t frame_rate() const
AnimationDriver(AnimationHandle *handle, float_t frame_rate)
AnimationDriver(const AnimationDriver &)=delete
float_t start_time() const
AbsAnimation * animation() const
AnimationDriver(AnimationDriver &&)=delete