mod.rs 476 B
mod _plugin {
use crate::system::AppState;
use bevy::prelude::*;
use bevy_rapier2d::prelude::*;
pub struct DebugPlugin;
impl Plugin for DebugPlugin {
fn build(&self, app: &mut App) {
app.add_systems(OnEnter(AppState::InGame), |mut commands: Commands| {
commands.spawn((
TransformBundle::from_transform(Transform::from_xyz(0.0, -400.0, 0.0)),
RigidBody::Fixed,
Collider::cuboid(200.0, 50.0),
));
});
}
}
}
pub use _plugin::DebugPlugin;