Add collectable items
This commit is contained in:
parent
826986cdbf
commit
69fee5e73d
10 changed files with 131 additions and 52 deletions
|
@ -2,6 +2,8 @@ import * as game from './index.mjs';
|
|||
import * as graphics from '../graphics/index.mjs';
|
||||
import * as world from '../world/index.mjs';
|
||||
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';
|
||||
|
||||
export let shipLanded = false;
|
||||
|
@ -48,3 +50,12 @@ export function invalidTilePlacement() {
|
|||
export function tilePlacement() {
|
||||
// TODO: Play some audio.
|
||||
}
|
||||
|
||||
export function tossItem() {
|
||||
particle.createItemToss(world.playerShip);
|
||||
}
|
||||
|
||||
export function collectItem(type, id) {
|
||||
inventory.addItem(type, id);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue