From 6038a5b701ee9ea3bd3b5da50d7d06930cd9a270 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 6 Apr 2024 15:35:51 +0200 Subject: refactor(ecs): make stopping into a action --- ecs/examples/event_loop.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ecs/examples') 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; } -- cgit v1.2.3-18-g5258