feat: Basic player implementation

This commit is contained in:
Alexey 2026-04-10 13:35:44 +03:00
commit e4b1475c48
9 changed files with 830 additions and 54 deletions

25
src/plugin.rs Normal file
View file

@ -0,0 +1,25 @@
//! Plugin module where everything is connected
use bevy::prelude::*;
use bevy_rapier2d::prelude::*;
use leafwing_input_manager::prelude::*;
use crate::*;
/// Plugin that connects everything needed for this prototype
pub struct GamePlugin;
impl Plugin for GamePlugin {
fn build(&self, app: &mut App) {
app.add_plugins((
RapierDebugRenderPlugin::default(),
RapierPhysicsPlugin::<()>::default()
.with_length_unit(meters(1.)),
InputManagerPlugin::<input::PlayerInput>::default(),
InputManagerPlugin::<input::DebugInput>::default(),
))
.add_systems(Startup, setup)
.add_systems(Update, player::systems::handle_input);
}
}