move collision_event_system to after platform_collision_event_system

This commit is contained in:
Nixon 2022-08-27 21:30:28 +08:00 committed by tuxmain
parent c597a9c6a9
commit 0627722906

View file

@ -59,7 +59,8 @@ impl Plugin for GamePlugin {
)
.add_system_to_stage(CoreStage::PostUpdate, char_char_collision_event_system)
.add_system_to_stage(CoreStage::PostUpdate, char_platform_collision_event_system)
.add_system_to_stage(CoreStage::PostUpdate, collision_event_system);
// collision event system might remove items, therefore, we should detect platforms first before removing them
.add_system_to_stage(CoreStage::PostUpdate, collision_event_system.after(char_platform_collision_event_system));
}
}
@ -111,12 +112,10 @@ pub struct PlatformCount(usize);
impl PlatformCount {
fn increment(&mut self) {
println!("increment");
self.0 += 1;
}
fn decrement(&mut self) {
println!("decrement");
self.0 = self.0.saturating_sub(1);
}