69 virtual bool IsPlaying()
const {
return m_isPlaying; }
72 virtual void Play() { m_isPlaying =
true; }
75 virtual void Pause() { m_isPlaying =
false; }
83 virtual void SetLoopCount(uint16_t loops = -1) { m_loopCounter = loops; }
88 std::vector<Region *> m_frames;
92 double m_secondsPerFrame;
94 double m_currentFrameTime;
virtual void Pause()
Pauses the animation.
Definition: Animation.h:75
Represents a 2D grid of texels.
Definition: Texture.h:17
virtual bool Load(const std::string &path, ResourceManager *pManager)
Load the desired animation into memory.
Definition: Animation.cpp:59
virtual Texture * GetTexture() const
Gets a pointer to the texture of the animation.
Definition: Animation.h:56
virtual bool IsCloneable() const
Used to determine if the animation is cloneable.
Definition: Animation.h:40
Contains timing values for game updates and rendering.
Definition: GameTime.h:17
virtual void Update(const GameTime *pGameTime)
Updates the animation.
Definition: Animation.cpp:37
virtual void Play()
Starts or resumes the animation.
Definition: Animation.h:72
virtual Resource * Clone()
Used to create a clone of the animation.
Definition: Animation.cpp:120
virtual void SetCurrentFrame(const unsigned int index)
Sets the current frame of the animation.
Definition: Animation.cpp:104
virtual void SetTexture(Texture *pTexture)
Sets the texture of the animation.
Definition: Animation.h:60
Base class for all resource types to be managed by the ResourceManager class.
Definition: Resource.h:19
virtual void Stop()
Stops the animation.
Definition: Animation.cpp:114
virtual void SetLoopCount(uint16_t loops=-1)
Sets how many times the animation will run before it stops.
Definition: Animation.h:83
Represents timing and framing values for texture animations.
Definition: Animation.h:17
virtual Region * GetCurrentFrame()
Gets a pointer to the current frame.
Definition: Animation.h:48
virtual bool IsPlaying() const
Determines if the animation is playing.
Definition: Animation.h:69
Defines a rectangular region defined by a point, height, width.
Definition: Region.h:17
Loads and manages the lifespan of objects from external files.
Definition: ResourceManager.h:17
virtual Region * GetFrame(const int index)
Gets a pointer to the indexed frame.
Definition: Animation.h:52
Katana Engine is a library of classes, interfaces, and value types that provides a foundation for dev...
Definition: Animation.cpp:14