From 8639bf5218f1d177226863ec27434d3c7091c871 Mon Sep 17 00:00:00 2001 From: Ricardo Antunes Date: Wed, 24 Jan 2024 19:31:20 +0000 Subject: [PATCH] feat(cubos): expose addRelation on Cubos --- engine/include/cubos/engine/cubos.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/engine/include/cubos/engine/cubos.hpp b/engine/include/cubos/engine/cubos.hpp index b8d25b3c3..5e52c1d4f 100644 --- a/engine/include/cubos/engine/cubos.hpp +++ b/engine/include/cubos/engine/cubos.hpp @@ -161,6 +161,16 @@ namespace cubos::engine template Cubos& addComponent(); + /// @brief Adds a new relation type to the engine. + /// @tparam C Type of the relation. + /// @return Reference to this object, for chaining. + template + Cubos& addRelation() + { + mWorld.registerRelation(); + return *this; + } + /// @brief Adds a new event type to the engine. /// @tparam E Type of the event. /// @return Reference to this object, for chaining.