Add instructions

This commit is contained in:
asraelite 2018-03-07 15:56:10 +00:00
parent 60f77c36a9
commit 2959c39da7
10 changed files with 119 additions and 21 deletions

View file

@ -46,7 +46,7 @@ export function tick() {
}
function tickPlaying() {
if (held[mapping.thrust]) {
if (held[mapping.thrust] && playerShip.fuel !== 0) {
playerShip.applyThrust({ forward: 1 });
let vol = Math.min(0.7, graphics.perspective.zoom / 10);
audio.volume('engine', vol);
@ -55,7 +55,11 @@ function tickPlaying() {
}
if (pressed[mapping.thrust]) {
audio.start('engine');
if (playerShip.fuel !== 0) {
audio.start('engine');
} else {
audio.stop('engine');
}
}
if (held[mapping.left]) {