mod _plugin { use crate::system::AppState; use bevy::prelude::*; use bevy::time::common_conditions::on_fixed_timer; use bevy_rapier2d::prelude::*; use std::time::Duration; 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), )); }) // .add_systems( // Update, // (|gamepads: Res<Gamepads>| info!("{:?}", gamepads)) // .run_if(on_fixed_timer(Duration::from_secs(5))), // ) ; } } } pub use _plugin::DebugPlugin;