Split staff into 3 abilities

This commit is contained in:
timokoesters
2020-03-24 13:59:53 +01:00
parent 7a4f0fa9ac
commit 99e7e1f785
16 changed files with 89 additions and 40 deletions

View File

@ -114,6 +114,7 @@ impl Default for Input {
pub struct ControllerInputs {
pub primary: Input,
pub secondary: Input,
pub ability3: Input,
pub sit: Input,
pub jump: Input,
pub roll: Input,
@ -141,6 +142,7 @@ impl ControllerInputs {
pub fn tick(&mut self, dt: Duration) {
self.primary.tick(dt);
self.secondary.tick(dt);
self.ability3.tick(dt);
self.sit.tick(dt);
self.jump.tick(dt);
self.roll.tick(dt);
@ -153,6 +155,10 @@ impl ControllerInputs {
self.swap_loadout.tick(dt);
self.charge.tick(dt);
}
pub fn holding_ability_key(&self) -> bool {
self.primary.is_pressed() || self.secondary.is_pressed() || self.ability3.is_pressed()
}
}
impl Controller {