Add item markers

This commit is contained in:
asraelite 2018-03-07 11:17:09 +00:00
parent b27bd7bba2
commit 3eb74e44aa
8 changed files with 41 additions and 12 deletions

View file

@ -12,7 +12,8 @@ export const mapping = {
exitEdit: 'Escape',
inventory: 'KeyE',
cycleRotation: 'KeyC',
toggleTrace: 'KeyT'
toggleTrace: 'KeyT',
toggleMarkers: 'KeyR'
};
let held, pressed;
@ -59,14 +60,16 @@ function tickPlaying() {
events.toggleTrace();
}
if (pressed[mapping.toggleMarkers]) {
events.toggleMarkers();
}
// For debugging.
if (pressed['KeyR']) events.startGame();
if (pressed['KeyZ']) events.startGame();
}
function tickEditing() {
if (pressed[mapping.exitEdit]) {
events.endEditing();
}
if (pressed['KeyX']) throw new Error();
}