Entity.h 803 B

123456789101112131415161718192021222324252627282930
  1. #ifndef INCLUDE_ENTITY_H
  2. #define INCLUDE_ENTITY_H
  3. #include "Rect.h"
  4. #include "Camera.h"
  5. #include "Tileset.h"
  6. namespace WalrusRPG
  7. {
  8. /**
  9. * Well, for now, this class will be a non abstract for ALPHA PROGRAMMING REASONS.
  10. * Expect this sooner or later to be abstract.
  11. * 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.
  12. */
  13. class Entity
  14. {
  15. protected:
  16. WalrusRPG::Utils::Rect coords;
  17. WalrusRPG::Tileset *tset;
  18. unsigned sprite_id;
  19. public:
  20. Entity(int x, int y, unsigned w, unsigned h, WalrusRPG::Tileset *tset, unsigned sprite_id);
  21. ~Entity();
  22. void render(Camera &camera, unsigned dt) const;
  23. void update(unsigned dt);
  24. };
  25. }
  26. #endif