Add audio
This commit is contained in:
parent
0101ef8d55
commit
62b8c74f57
26 changed files with 225 additions and 18 deletions
|
@ -5,6 +5,7 @@ import * as player from './player.mjs';
|
|||
import * as inventory from './inventory.mjs';
|
||||
import * as particle from '../world/particle.mjs';
|
||||
import * as edit from './edit.mjs';
|
||||
import * as audio from './audio.mjs';
|
||||
|
||||
export let shipLanded = false;
|
||||
|
||||
|
@ -71,6 +72,7 @@ export function endEditing() {
|
|||
let {valid, reason} = edit.end();
|
||||
|
||||
if (valid) {
|
||||
audio.play('endEdit');
|
||||
graphics.changePerspective('universe');
|
||||
game.state.editing = false;
|
||||
game.state.inventory = false;
|
||||
|
@ -91,5 +93,6 @@ export function tossItem() {
|
|||
|
||||
export function collectItem(type, id) {
|
||||
inventory.addItem(type, id);
|
||||
audio.play('itemPickup');
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue