Add start of ship rendering
This commit is contained in:
parent
4a253b0184
commit
704c82838a
15 changed files with 199 additions and 13 deletions
|
@ -1,3 +1,26 @@
|
|||
import * as sector from './sector.mjs';
|
||||
import * as spawn from './spawn.mjs';
|
||||
|
||||
export {getSectorFromWorld, getContainedSectors} from './sector.mjs';
|
||||
|
||||
export const entities = new Set();
|
||||
export const celestials = new Set();
|
||||
export const ships = new Set();
|
||||
|
||||
export let playerShip = null;
|
||||
|
||||
export function setPlayerShip(ship) {
|
||||
playerShip = ship;
|
||||
}
|
||||
|
||||
export function init() {
|
||||
entities.clear();
|
||||
celestials.clear();
|
||||
spawn.player();
|
||||
}
|
||||
|
||||
export function tick() {
|
||||
celestials.forEach(c => c.tick());
|
||||
entities.forEach(e => e.tick());
|
||||
ships.forEach(s => s.tick());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue