Entity.h 882 B

123456789101112131415161718192021222324252627282930313233
  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
  13. * or compositing from this, if we use components or heritance.
  14. */
  15. class Entity
  16. {
  17. protected:
  18. WalrusRPG::Utils::Rect coords;
  19. WalrusRPG::Renderer *tset;
  20. unsigned sprite_id;
  21. public:
  22. Entity(int x, int y, unsigned w, unsigned h, WalrusRPG::Renderer *tset,
  23. unsigned sprite_id);
  24. ~Entity();
  25. void render(Camera &camera, unsigned dt) const;
  26. void update(unsigned dt);
  27. };
  28. }
  29. #endif