#pragma once #include using JGL::Texture; class Animation { protected: std::string name{}; float ms_between_frames = 1.0f; std::vector textures{}; public: [[nodiscard]] std::string GetName() const; [[nodiscard]] float GetMsBetweenFrames() const; /// @param animation_time a float from 0 to 1. 0 being the beginning of the animation and 1 being the end. [[nodiscard]] const JGL::Texture* GetTexture(float animation_time) const; public: void SetMsBetweenFrames(float new_ms_between_frames); public: Animation(const std::string& name, float ms_between_frames, std::vector& textures) : name(name), ms_between_frames(ms_between_frames), textures(textures) {}; ~Animation() = default; };