refactor(gameplay): separate player logic into manager and ECS components

This commit is contained in:
2026-07-28 21:00:04 +08:00
parent 0ff5820e6e
commit d15037e7a3
26 changed files with 640 additions and 493 deletions

View File

@@ -1,15 +1,20 @@
#pragma once
#include "Cubed/gameplay/entity.hpp"
#include "Cubed//gameplay/ecs/server_entity.hpp"
#include "Cubed/gameplay/world.hpp"
namespace Cubed {
class PhysicalSystem {
public:
static glm::vec3 get_move_distance(float dt, const Entity& e);
static std::tuple<bool, bool, bool> update(float dt, Entity& e,
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, Entity& e, World& world, glm::vec3& moved_pos);
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,
Direction& direction, MoveState& move_state, HitboxID hitbox);
private:
};