Remove collision debug print system
This commit is contained in:
10
src/lib.rs
10
src/lib.rs
@@ -13,7 +13,7 @@ mod widgets;
|
|||||||
use crate::config::{
|
use crate::config::{
|
||||||
ASTEROID_SMALL_COLOR, BACKGROUND_COLOR, BULLET_COLOR, BULLET_LIFETIME, BULLET_SPEED,
|
ASTEROID_SMALL_COLOR, BACKGROUND_COLOR, BULLET_COLOR, BULLET_LIFETIME, BULLET_SPEED,
|
||||||
PLAYER_SHIP_COLOR, SHIP_ROTATION, SHIP_THRUST, SHIP_THRUSTER_COLOR_ACTIVE,
|
PLAYER_SHIP_COLOR, SHIP_ROTATION, SHIP_THRUST, SHIP_THRUSTER_COLOR_ACTIVE,
|
||||||
SHIP_THRUSTER_COLOR_INACTIVE, WINDOW_SIZE,
|
SHIP_THRUSTER_COLOR_INACTIVE,
|
||||||
};
|
};
|
||||||
use crate::machinery::AsteroidSpawner;
|
use crate::machinery::AsteroidSpawner;
|
||||||
use crate::objects::{Bullet, Ship};
|
use crate::objects::{Bullet, Ship};
|
||||||
@@ -64,8 +64,6 @@ impl Plugin for AsteroidPlugin {
|
|||||||
objects::bullet_impact_listener,
|
objects::bullet_impact_listener,
|
||||||
objects::ship_impact_listener,
|
objects::ship_impact_listener,
|
||||||
physics::collision_listener,
|
physics::collision_listener,
|
||||||
// TODO: Remove debug printing
|
|
||||||
debug_collision_event_printer,
|
|
||||||
machinery::tick_lifetimes,
|
machinery::tick_lifetimes,
|
||||||
)
|
)
|
||||||
.run_if(in_state(GameState::Playing)),
|
.run_if(in_state(GameState::Playing)),
|
||||||
@@ -86,12 +84,6 @@ impl Plugin for AsteroidPlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn debug_collision_event_printer(mut collision_events: EventReader<CollisionEvent>) {
|
|
||||||
for event in collision_events.read() {
|
|
||||||
dbg!(event);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The game's main state tracking mechanism, registered with Bevy as a [`State`](`bevy::prelude::State`).
|
/// The game's main state tracking mechanism, registered with Bevy as a [`State`](`bevy::prelude::State`).
|
||||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, States)]
|
#[derive(Clone, Debug, Eq, Hash, PartialEq, States)]
|
||||||
pub enum GameState {
|
pub enum GameState {
|
||||||
|
|||||||
Reference in New Issue
Block a user