create scaffolding

This commit is contained in:
Jim 2025-08-24 09:42:18 -04:00
commit 82a0fbdb50
Signed by: jim
GPG key ID: 3236D2F059A7C0AC
25 changed files with 6993 additions and 0 deletions

View file

@ -0,0 +1,27 @@
use bevy::prelude::*;
use crate::{Inputs, actions::InputAction};
pub fn action_pressed<T: Send + Sync + 'static>(
action: InputAction,
) -> impl FnMut(Res<Inputs<T>>) -> bool + Clone {
move |inputs: Res<Inputs<T>>| inputs.pressed(action)
}
pub fn action_just_pressed<T: Send + Sync + 'static>(
action: InputAction,
) -> impl FnMut(Res<Inputs<T>>) -> bool + Clone {
move |inputs: Res<Inputs<T>>| inputs.just_pressed(action)
}
pub fn action_released<T: Send + Sync + 'static>(
action: InputAction,
) -> impl FnMut(Res<Inputs<T>>) -> bool + Clone {
move |inputs: Res<Inputs<T>>| inputs.released(action)
}
pub fn action_just_released<T: Send + Sync + 'static>(
action: InputAction,
) -> impl FnMut(Res<Inputs<T>>) -> bool + Clone {
move |inputs: Res<Inputs<T>>| inputs.just_released(action)
}