dEngine
Simple 2D C++ game engine
Sprite.h
Go to the documentation of this file.
1 #ifndef DENGINE_SPRITE_H
2 #define DENGINE_SPRITE_H
3 
4 
5 #include <SDL.h>
6 #include "../System/Component.h"
7 #include "../System/GameObject.h"
8 #include "../System/Game.h"
9 #include <SDL_image.h>
10 #include "../System/CameraManager.h"
11 
12 namespace dengine {
17  class Sprite : public Component {
18  public:
23  Sprite(std::string filepath, GameObject &parent);
24 
29  ~Sprite();
30 
35  void Render() override;
36 
41  SDL_Texture *getTexture();
42 
43  private:
44  SDL_Texture *texture;
45  };
46 }
47 
48 #endif //DENGINE_SPRITE_H
void Render() override
Render Function.
Definition: Sprite.cpp:20
A base object for a game The gameobject can be considered the most basic building block of a game...
Definition: GameObject.h:19
A sprite.
Definition: Sprite.h:17
Sprite(std::string filepath, GameObject &parent)
Constructor.
Definition: Sprite.cpp:5
SDL_Texture * texture
Definition: Sprite.h:44
Gameobject component that asssists in adding additional functionality.
Definition: Component.h:14
SDL_Texture * getTexture()
Sprite Texture.
Definition: Sprite.cpp:25
GameObject & parent
Definition: Component.h:53
The namespace containing the engine&#39;s code.
Definition: Collider.h:9
~Sprite()
Desctructor.
Definition: Sprite.cpp:16