24 std::vector<std::reference_wrapper<Texture>> frames_;
25 const int interval_ms_;
27 int current_texture_index_;
28 int accumulator_time_ms_;
32 bool is_non_interruptible_{
false};
34 [[nodiscard]]
int calculate_next_frame_index(
int intervals_advanced)
const;
35 void update_sprite_texture(
int new_frame_index);
38 explicit Animator(
const std::string& sprite_sheet_name,
int interval_ms);
40 void play(
bool is_looping);
41 void play(
const std::string& animation_name,
bool is_looping);
51 void update(
float dt_seconds) override;
55 const std::vector<std::reference_wrapper<
Texture>>& frames_);
Represents a texture used in rendering game objects. Encapsulates an SDL_Texture and provides access ...
Definition texture.h:10