Entity.h 832 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef INCLUDE_ENTITY_H
  2. #define INCLUDE_ENTITY_H
  3. #include "Rect.h"
  4. #include "Camera.h"
  5. #include "Renderer.h"
  6. #include "TileRenderer.h"
  7. namespace WalrusRPG
  8. {
  9. /**
  10. * Well, for now, this class will be a non abstract for ALPHA PROGRAMMING REASONS.
  11. * Expect this sooner or later to be abstract.
  12. * I don't know at this moment how will we manage the different classes heriting or compositing from this, if we use components or heritance.
  13. */
  14. class Entity
  15. {
  16. protected:
  17. WalrusRPG::Utils::Rect coords;
  18. WalrusRPG::Renderer *tset;
  19. unsigned sprite_id;
  20. public:
  21. Entity(int x, int y, unsigned w, unsigned h, WalrusRPG::Renderer *tset, unsigned sprite_id);
  22. ~Entity();
  23. void render(Camera &camera, unsigned dt) const;
  24. void update(unsigned dt);
  25. };
  26. }
  27. #endif