mirror of
https://github.com/BlackMATov/ecs.hpp.git
synced 2025-12-13 02:26:27 +07:00
fix overriding components in prototype
This commit is contained in:
@@ -586,6 +586,15 @@ TEST_CASE("registry") {
|
||||
REQUIRE(e2.component_count() == 1u);
|
||||
REQUIRE(e2.get_component<position_c>() == position_c(1,2));
|
||||
}
|
||||
{
|
||||
ecs::prototype p;
|
||||
p.component<position_c>(1, 2);
|
||||
p.component<position_c>(11, 22);
|
||||
|
||||
ecs::registry w;
|
||||
const auto e1 = w.create_entity(p);
|
||||
REQUIRE(e1.get_component<position_c>() == position_c(11,22));
|
||||
}
|
||||
{
|
||||
const auto p = ecs::prototype()
|
||||
.component<position_c>(1,2)
|
||||
|
||||
Reference in New Issue
Block a user