summaryrefslogtreecommitdiff
path: root/ecs/examples
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-04-06 15:35:51 +0200
committerHampusM <hampus@hampusmat.com>2024-04-06 16:09:25 +0200
commit6038a5b701ee9ea3bd3b5da50d7d06930cd9a270 (patch)
tree4b00618fd6f8290006dcedb92f15bde20cba93ce /ecs/examples
parent97f973d685baf389dcde08044dd3dfb7ba556050 (diff)
refactor(ecs): make stopping into a action
Diffstat (limited to 'ecs/examples')
-rw-r--r--ecs/examples/event_loop.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/ecs/examples/event_loop.rs b/ecs/examples/event_loop.rs
index f9fd85f..b6a10e3 100644
--- a/ecs/examples/event_loop.rs
+++ b/ecs/examples/event_loop.rs
@@ -1,5 +1,5 @@
+use ecs::actions::Actions;
use ecs::event::{Event, Id as EventId};
-use ecs::flags::Flags;
use ecs::{Component, Query, World};
#[derive(Component)]
@@ -45,7 +45,7 @@ fn feed(query: Query<(Health, Name)>)
}
}
-fn age(query: Query<(Health, Name)>, mut flags: Flags)
+fn age(query: Query<(Health, Name)>, mut actions: Actions)
{
for (mut health, name) in &query {
if health.health <= 2 {
@@ -53,7 +53,7 @@ fn age(query: Query<(Health, Name)>, mut flags: Flags)
println!("{} passed away", name.name);
- flags.stop();
+ actions.stop();
continue;
}