Advertisement
Al99

SDLGameObject.h

Nov 11th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. #ifndef __SDLGameObject__
  2. #define __SDLGameObject__
  3.  
  4. #include <SDL2/SDL.h>
  5. #include <string>
  6. #include "Game.h"
  7. #include "GameObject.h"
  8. #include "LoaderParams.h"
  9. #include "Vector2d.h"
  10.  
  11. class SDLGameObject : public GameObject
  12. {
  13.     public:
  14.    
  15.     SDLGameObject (const LoaderParams* pParams);
  16.    
  17.     virtual void draw(SDL_Renderer* pRenderer);
  18.     virtual void update();
  19.     virtual void clean();
  20.    
  21.     protected:
  22.    
  23.     Vector2d m_position;
  24.    
  25.     int m_width;
  26.     int m_height;
  27.    
  28.     int m_currentRow;
  29.     int m_currentFrame;
  30.    
  31.     std::string m_textureID;
  32.    
  33.     Vector2d m_velocity;
  34.    
  35.     Vector2d m_acceleration;
  36. };
  37.  
  38. #endif /*defined (SDLGameObject) */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement