Add rotation view and path prediction toggles
This commit is contained in:
parent
ce6a707526
commit
5b861cc341
12 changed files with 195 additions and 19 deletions
|
@ -11,6 +11,8 @@ export const mapping = {
|
|||
right: 'KeyD',
|
||||
exitEdit: 'Escape',
|
||||
inventory: 'KeyE',
|
||||
cycleRotation: 'KeyC',
|
||||
toggleTrace: 'KeyT'
|
||||
};
|
||||
|
||||
let held, pressed;
|
||||
|
@ -49,6 +51,15 @@ function tickPlaying() {
|
|||
state.inventory = !state.inventory;
|
||||
}
|
||||
|
||||
if (pressed[mapping.cycleRotation]) {
|
||||
events.cycleRotationMode();
|
||||
}
|
||||
|
||||
if (pressed[mapping.toggleTrace]) {
|
||||
events.toggleTrace();
|
||||
}
|
||||
|
||||
// For debugging.
|
||||
if (pressed['KeyR']) events.startGame();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue