move ecs related code to own folder

This commit is contained in:
2026-05-25 08:46:58 +02:00
parent 8ad7530740
commit 25ff3c56c5
54 changed files with 877 additions and 680 deletions

View File

@@ -2,7 +2,9 @@
#include <QVector2D>
#include "DespawnAtComponent.h"
#include "EntityAdmin.h"
#include "ScrapDataComponent.h"
#include "ScrapSystem.h"
// ---------------------------------------------------------------------------
@@ -17,8 +19,8 @@ TEST_CASE("ScrapSystem: spawn returns a valid entity with correct scrap data", "
const entt::entity e = ss.spawn(QVector2D(3.0f, 4.0f), 5, 100);
REQUIRE(admin.isValid(e));
REQUIRE(admin.get<ScrapData>(e).amount == 5);
REQUIRE(admin.get<DespawnAt>(e).tick == 100);
REQUIRE(admin.get<ScrapDataComponent>(e).amount == 5);
REQUIRE(admin.get<DespawnAtComponent>(e).tick == 100);
}
// ---------------------------------------------------------------------------