move collision_event_system to after platform_collision_event_system

This commit is contained in:
Nixon 2022-08-27 21:30:28 +08:00
parent 9d58c12955
commit ccf86e23e4

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_char_collision_event_system)
.add_system_to_stage(CoreStage::PostUpdate, char_platform_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 { impl PlatformCount {
fn increment(&mut self) { fn increment(&mut self) {
println!("increment");
self.0 += 1; self.0 += 1;
} }
fn decrement(&mut self) { fn decrement(&mut self) {
println!("decrement");
self.0 = self.0.saturating_sub(1); self.0 = self.0.saturating_sub(1);
} }