use bevy::prelude::*;
use leafwing_input_manager::{action_state::ActionState, InputManagerBundle};
use crate::{
events::{MenuInteraction, PlayerAction},
player::Player,
};
pub fn spawn_player_controller(mut commands: Commands) {
commands
.spawn(InputManagerBundle::<PlayerAction> {
action_state: ActionState::default(),
input_map: PlayerAction::default_input_map(),
})
.insert(Player);
commands
.spawn(InputManagerBundle::<MenuInteraction> {
action_state: ActionState::default(),
input_map: MenuInteraction::default_input_map(),
})
.insert(Player);
}