World.h 464 B

12345678910111213141516171819202122232425262728
  1. #ifndef WORLD_H
  2. #define WORLD_H
  3. #include "common/entities/Entity.h"
  4. #include "common/world/BlockStorage.h"
  5. #include "utils/List.h"
  6. class World final {
  7. List<Entity*> entities;
  8. public:
  9. BlockStorage blocks;
  10. mutable bool dirty;
  11. World();
  12. void addEntity(Entity* e);
  13. void removeEntity(Entity* e);
  14. void tick();
  15. Vector3 limitMove(const Entity& e, Vector3 move) const;
  16. private:
  17. List<Box> getBoxes(const Box& box) const;
  18. };
  19. #endif