diff --git a/src/engine/controls/mod.rs b/src/engine/controls/mod.rs index a30429e..d5926b0 100644 --- a/src/engine/controls/mod.rs +++ b/src/engine/controls/mod.rs @@ -94,18 +94,12 @@ pub struct KeyboardMap { /// The key corresponding to the run button. run_key: Key, - /// The key corresponding to the up button. - up_key: Key, - /// The key corresponding to the left button. left_key: Key, /// The key corresponding to the right button. right_key: Key, - /// The key corresponding to the down button. - down_key: Key, - } impl KeyboardMap { @@ -115,10 +109,8 @@ impl KeyboardMap { KeyboardMap { jump_key: Key::Space, run_key: Key::LAlt, - up_key: Key::Up, left_key: Key::Left, right_key: Key::Right, - down_key: Key::Down, } } @@ -143,7 +135,6 @@ impl KeyboardMap { let mut ret = Vector2::new(0.0, 0.0); const RIGHT: Vector2 = Vector2 { x: 1.0, y: 0.0 }; - const UP: Vector2 = Vector2 {x: 0.0, y: 1.0}; if self.right_key.is_pressed() { ret += RIGHT; @@ -153,14 +144,6 @@ impl KeyboardMap { ret -= RIGHT; } - if self.up_key.is_pressed() { - ret += UP; - } - - if self.down_key.is_pressed() { - ret -= UP; - } - ret }