mirror of
https://github.com/richardharrington/robotwar.git
synced 2024-06-09 23:29:40 +00:00
added keyboard event listeners for fast-forwarding
This commit is contained in:
parent
2671d42f0e
commit
af2a9272e3
|
@ -142,4 +142,15 @@
|
|||
" " + debugSimulationCounter);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('body').bind('keyup', function(event) {
|
||||
if (event.which === 37) {
|
||||
fastForward = Math.max(1, fastForward - 1);
|
||||
}
|
||||
if (event.which === 39) {
|
||||
fastForward = Math.min(MAX_FAST_FORWARD, fastForward + 1);
|
||||
}
|
||||
console.log("fast forward: " + fastForward);
|
||||
});
|
||||
})();
|
||||
|
|
Loading…
Reference in New Issue
Block a user