From f9149b3a13f70744f7c458e85022567efa3ab2c0 Mon Sep 17 00:00:00 2001 From: cat Date: Sun, 8 Mar 2026 01:14:55 +0200 Subject: [PATCH] Bump --- test_getcomponent.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/test_getcomponent.cpp b/test_getcomponent.cpp index e9ddd31..72bf6b8 100644 --- a/test_getcomponent.cpp +++ b/test_getcomponent.cpp @@ -4,17 +4,18 @@ #include #include #include -#include using namespace Tourmaline; using namespace Systems; + +struct test : public ECS::Component { + int x; +}; + int main() { ECS::World game; auto player = game.CreateEntity(); - auto &coordinates = game.GetComponent(player); - - std::print("Entity {}, x = {}, y = {}, z = {}\n", player.asString(), - coordinates.x, coordinates.y, coordinates.z); + auto &coordinates = game.GetComponent(player); /* for (int x = 0; x < 100000; x++) { @@ -24,10 +25,11 @@ int main() { */ coordinates.x += 4; - coordinates.y -= 2.5; - coordinates.z = -10; + Logging::LogFormatted("x = {}", "test", Logging::LogLevel::Info, + coordinates.x); + + // This should fail + auto &testComp = game.GetComponent(player); - std::print("Entity {}, x = {}, y = {}, z = {}\n", player.asString(), - coordinates.x, coordinates.y, coordinates.z); return 0; }