Reset controller after each tick

This commit is contained in:
timokoesters 2019-08-23 22:11:14 +02:00
parent 5d5ccd7b99
commit 90c81b4759
No known key found for this signature in database
GPG Key ID: CD80BE9AAEE78097
2 changed files with 3 additions and 5 deletions

View File

@ -125,11 +125,6 @@ impl<'a> System<'a> for Sys {
dbg!();
event_emitter.emit(Event::Jump(entity));
}
// TODO before merge: reset controller in a final ecs system
// Reset the controller ready for the next tick
//*controller = Controller::default();
}
}
}

View File

@ -1,5 +1,6 @@
pub mod agent;
pub mod animation;
mod cleanup;
pub mod combat;
pub mod controller;
pub mod movement;
@ -17,6 +18,7 @@ const MOVEMENT_SYS: &str = "movement_sys";
const COMBAT_SYS: &str = "combat_sys";
const ANIMATION_SYS: &str = "animation_sys";
const STATS_SYS: &str = "stats_sys";
const CLEANUP_SYS: &str = "cleanup_sys";
pub fn add_local_systems(dispatch_builder: &mut DispatcherBuilder) {
dispatch_builder.add(agent::Sys, AGENT_SYS, &[]);
@ -26,4 +28,5 @@ pub fn add_local_systems(dispatch_builder: &mut DispatcherBuilder) {
dispatch_builder.add(combat::Sys, COMBAT_SYS, &[CONTROLLER_SYS]);
dispatch_builder.add(animation::Sys, ANIMATION_SYS, &[CONTROLLER_SYS]);
dispatch_builder.add(stats::Sys, STATS_SYS, &[COMBAT_SYS]);
dispatch_builder.add(cleanup::Sys, CLEANUP_SYS, &[STATS_SYS, ANIMATION_SYS]);
}