Skip to content

Commit

Permalink
feat(cubos): expose addRelation on Cubos
Browse files Browse the repository at this point in the history
  • Loading branch information
RiscadoA committed Jan 24, 2024
1 parent ef1733b commit 8639bf5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions engine/include/cubos/engine/cubos.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ namespace cubos::engine
template <typename C>
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 <typename R>
Cubos& addRelation()
{
mWorld.registerRelation<R>();
return *this;
}

/// @brief Adds a new event type to the engine.
/// @tparam E Type of the event.
/// @return Reference to this object, for chaining.
Expand Down

0 comments on commit 8639bf5

Please sign in to comment.