World.h 434 B

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