General improvements
I forgot what I actually changed. It may not even be playable, I just want to get this up there.
This commit is contained in:
parent
8a0bf0ada9
commit
c73130e3ff
25 changed files with 584 additions and 274 deletions
|
@ -3,6 +3,7 @@ import * as events from './events.mjs';
|
|||
import * as graphics from '../graphics/index.mjs';
|
||||
import * as inventory from './inventory.mjs';
|
||||
import * as audio from './audio.mjs';
|
||||
import * as world from '../world/index.mjs';
|
||||
import {playerShip} from '../world/index.mjs';
|
||||
import {state} from './index.mjs';
|
||||
|
||||
|
@ -19,7 +20,9 @@ export const mapping = {
|
|||
toggleMusic: 'KeyM',
|
||||
togglePause: 'KeyP',
|
||||
zoomIn: 'KeyZ',
|
||||
zoomOut: 'KeyX'
|
||||
zoomOut: 'KeyX',
|
||||
increaseSpeed: 'Period',
|
||||
decreaseSpeed: 'Comma',
|
||||
};
|
||||
|
||||
let held, pressed;
|
||||
|
@ -52,6 +55,14 @@ export function tick() {
|
|||
if (pressed[mapping.togglePause] && !state.gameOver) {
|
||||
events.togglePause();
|
||||
}
|
||||
|
||||
if (pressed[mapping.increaseSpeed]) {
|
||||
world.increaseSpeed();
|
||||
}
|
||||
|
||||
if (pressed[mapping.decreaseSpeed]) {
|
||||
world.decreaseSpeed();
|
||||
}
|
||||
}
|
||||
|
||||
if (state.gameOver) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue