76 virtual bool IsPlaying()
const {
return m_isPlaying; }
79 virtual void Play() { m_isPlaying =
true; }
82 virtual void Pause() { m_isPlaying =
false; }
90 virtual void SetLoopCount(uint16_t loops = -1) { m_loopCounter = loops; }
95 std::vector<Region *> m_frames;
99 double m_secondsPerFrame = 0;
101 double m_currentFrameTime = 0;
103 int m_currentIndex = 0;
105 int m_loopCounter = 0;
107 bool m_isPlaying =
false;
Represents timing and framing values for texture animations.
virtual void SetCurrentFrame(const unsigned int index)
Sets the current frame of the animation.
virtual void Pause()
Pauses the animation.
virtual void SetTexture(Texture *pTexture)
Sets the texture of the animation.
virtual Texture * GetTexture() const
Gets a pointer to the texture of the animation.
virtual bool IsPlaying() const
Determines if the animation is playing.
virtual Region * GetCurrentFrame()
Gets a pointer to the current frame.
virtual void Update(const GameTime &gameTime)
Updates the animation.
virtual int GetCurrentIndex()
Gets the index of the current frame.
virtual bool IsCloneable() const
Used to determine if the animation is cloneable.
virtual void SetLoopCount(uint16_t loops=-1)
Sets how many times the animation will run before it stops.
virtual Resource * Clone()
Used to create a clone of the animation.
virtual bool Load(const std::string &path, ResourceManager *pManager)
Load the desired animation into memory.
virtual void Play()
Starts or resumes the animation.
virtual Region * GetFrame(const int index)
Gets a pointer to the indexed frame.
virtual void Stop()
Stops the animation.
Contains timing values for game updates and rendering.
Defines a rectangular region defined by a point, height, width.
Base class for all resource types to be managed by the ResourceManager class.
Loads and manages the lifespan of objects from external files.
Represents a 2D grid of texels.
Katana Engine is a library of classes, interfaces, and value types that provides a foundation for dev...