begin impl state handle traits

This commit is contained in:
Adam Whitehurst
2019-12-20 05:30:37 -08:00
parent 226826e026
commit e074c7ce1d
6 changed files with 556 additions and 662 deletions

View File

@ -154,21 +154,6 @@ impl ControllerInputs {
self.toggle_wield.tick(dt);
self.charge.tick(dt);
}
/// Updates `inputs.move_dir`.
pub fn update_move_dir(&mut self) {
self.move_dir = if self.move_dir.magnitude_squared() > 1.0 {
// Cap move_dir to 1
self.move_dir.normalized()
} else {
self.move_dir
};
}
/// Updates `inputs.look_dir`
pub fn update_look_dir(&mut self) {
self.look_dir
.try_normalized()
.unwrap_or(self.move_dir.into());
}
}
impl Controller {