mirror of
https://github.com/BlackMATov/ecs.hpp.git
synced 2025-12-16 22:19:21 +07:00
fix readme example
This commit is contained in:
@@ -80,6 +80,7 @@ private:
|
|||||||
|
|
||||||
ecs_hpp::registry world;
|
ecs_hpp::registry world;
|
||||||
world.add_system<movement_system>();
|
world.add_system<movement_system>();
|
||||||
|
world.add_system<gravity_system>(9.8f);
|
||||||
|
|
||||||
auto entity_one = world.create_entity();
|
auto entity_one = world.create_entity();
|
||||||
world.assign_component<position_component>(entity_one, 4.f, 2.f);
|
world.assign_component<position_component>(entity_one, 4.f, 2.f);
|
||||||
|
|||||||
@@ -747,6 +747,7 @@ TEST_CASE("example") {
|
|||||||
|
|
||||||
ecs_hpp::registry world;
|
ecs_hpp::registry world;
|
||||||
world.add_system<movement_system>();
|
world.add_system<movement_system>();
|
||||||
|
world.add_system<gravity_system>(9.8f);
|
||||||
|
|
||||||
auto entity_one = world.create_entity();
|
auto entity_one = world.create_entity();
|
||||||
world.assign_component<position_component>(entity_one, 4.f, 2.f);
|
world.assign_component<position_component>(entity_one, 4.f, 2.f);
|
||||||
|
|||||||
Reference in New Issue
Block a user