add pathfinding
This commit is contained in:
+3
-1
@@ -12,6 +12,7 @@
|
||||
#include "settings.hpp"
|
||||
#include "voxels/Chunk.hpp"
|
||||
#include "voxels/GlobalChunks.hpp"
|
||||
#include "voxels/Pathfinding.hpp"
|
||||
#include "window/Camera.hpp"
|
||||
#include "LevelEvents.hpp"
|
||||
#include "World.hpp"
|
||||
@@ -27,7 +28,8 @@ Level::Level(
|
||||
physics(std::make_unique<PhysicsSolver>(glm::vec3(0, -22.6f, 0))),
|
||||
events(std::make_unique<LevelEvents>()),
|
||||
entities(std::make_unique<Entities>(*this)),
|
||||
players(std::make_unique<Players>(*this)) {
|
||||
players(std::make_unique<Players>(*this)),
|
||||
pathfinding(std::make_unique<voxels::Pathfinding>(*this)) {
|
||||
const auto& worldInfo = world->getInfo();
|
||||
auto& cameraIndices = content.getIndices(ResourceType::CAMERA);
|
||||
for (size_t i = 0; i < cameraIndices.size(); i++) {
|
||||
|
||||
@@ -18,6 +18,10 @@ class Camera;
|
||||
class Players;
|
||||
struct EngineSettings;
|
||||
|
||||
namespace voxels {
|
||||
class Pathfinding;
|
||||
}
|
||||
|
||||
/// @brief A level, contains chunks and objects
|
||||
class Level {
|
||||
std::unique_ptr<World> world;
|
||||
@@ -30,6 +34,7 @@ public:
|
||||
std::unique_ptr<LevelEvents> events;
|
||||
std::unique_ptr<Entities> entities;
|
||||
std::unique_ptr<Players> players;
|
||||
std::unique_ptr<voxels::Pathfinding> pathfinding;
|
||||
std::vector<std::shared_ptr<Camera>> cameras; // move somewhere?
|
||||
|
||||
Level(
|
||||
|
||||
Reference in New Issue
Block a user