mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-17 04:45:02 +01:00
Make camera controls WASD too
This commit is contained in:
parent
ff6dcca482
commit
36ea9ed75d
1 changed files with 4 additions and 4 deletions
|
|
@ -200,16 +200,16 @@ impl App {
|
||||||
} else {
|
} else {
|
||||||
2
|
2
|
||||||
};
|
};
|
||||||
if self.input.down(Key::Left) {
|
if self.input.down(Key::A) {
|
||||||
self.game.camera_offset.x = self.game.camera_offset.x.saturating_sub(spd);
|
self.game.camera_offset.x = self.game.camera_offset.x.saturating_sub(spd);
|
||||||
}
|
}
|
||||||
if self.input.down(Key::Right) {
|
if self.input.down(Key::D) {
|
||||||
self.game.camera_offset.x = self.game.camera_offset.x.saturating_add(spd);
|
self.game.camera_offset.x = self.game.camera_offset.x.saturating_add(spd);
|
||||||
}
|
}
|
||||||
if self.input.down(Key::Up) {
|
if self.input.down(Key::W) {
|
||||||
self.game.camera_offset.y = self.game.camera_offset.y.saturating_sub(spd);
|
self.game.camera_offset.y = self.game.camera_offset.y.saturating_sub(spd);
|
||||||
}
|
}
|
||||||
if self.input.down(Key::Down) {
|
if self.input.down(Key::S) {
|
||||||
self.game.camera_offset.y = self.game.camera_offset.y.saturating_add(spd);
|
self.game.camera_offset.y = self.game.camera_offset.y.saturating_add(spd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue