feat(gameplay): add entity managers and refactor to ECS components

This commit is contained in:
2026-07-29 18:06:04 +08:00
parent d15037e7a3
commit 3a9ab6a14a
20 changed files with 294 additions and 71 deletions

View File

@@ -1,5 +1,7 @@
#pragma once
#include "Cubed//gameplay/ecs/server_entity.hpp"
#include "Cubed/gameplay/ecs/movement.hpp"
#include "Cubed/gameplay/ecs/state.hpp"
#include "Cubed/gameplay/ecs/transform.hpp"
#include "Cubed/gameplay/world.hpp"
namespace Cubed {
@@ -7,10 +9,6 @@ class PhysicalSystem {
public:
static glm::vec3 get_move_distance(float dt, const Direction& d,
const Velocity& v);
static std::tuple<bool, bool, bool> update(float dt, ServerEntity& e,
World& world);
static std::tuple<bool, bool, bool>
update(float dt, ServerEntity& e, World& world, glm::vec3& moved_pos);
static std::tuple<bool, bool, bool>
update(float dt, World& world, glm::vec3& moved_pos, Velocity& v,