bevy_input_bindings 0.0.2

High level, flexible and shareable input binding library for the Bevy game engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use bevy::ecs::component::Component;

use super::triggers::TriggerTrait;
use super::values::FunctionTrait;

pub trait KeyboardBinding<ActionKey, ValueKey>: Component {
    fn get_action_bindings<'a>(&'a mut self) -> Vec<(&'a mut dyn TriggerTrait, ActionKey)> {
        return vec![];
    }

    fn get_value_bindings<'a>(&'a mut self) -> Vec<(&'a mut dyn FunctionTrait, ValueKey)> {
        return vec![];
    }
}