PROTO::KLUDGE  0.1
Quick prototyping library for games using SDL and OpenGL.
GLFrameAnimation.hpp
Go to the documentation of this file.
1 #ifndef GLFRAMEANIMATION_HPP
2 #define GLFRAMEANIMATION_HPP
3 
4 #include <stdio.h>
5 
6 #include <vector>
7 
8 #include "graphics/GLSprite.hpp"
9 
10 namespace pk
11 {
12 
14 {
15  public:
16 
18 
19  virtual ~GLFrameAnimation();
20 
21  void printFrames();
22 
23  void addFrame(GLRect frame);
24 
25  void loop(bool l){ m_loop = l; };
26 
27  void play(GLSprite &sprite);
28 
29  private:
30  std::vector<GLRect> m_frames;
31  bool m_loop;
32 };
33 
34 }
35 
36 #endif // GLFRAMEANIMATION_HPP
Definition: Game.hpp:7
void addFrame(GLRect frame)
bool m_loop
Definition: GLFrameAnimation.hpp:31
Definition: GLFrameAnimation.hpp:13
Useful for defining size and origin of an OpenGL object.
Definition: GLTransformable.hpp:15
void play(GLSprite &sprite)
void loop(bool l)
Definition: GLFrameAnimation.hpp:25
std::vector< GLRect > m_frames
Definition: GLFrameAnimation.hpp:30
virtual ~GLFrameAnimation()
Definition: GLSprite.hpp:13