Add start of ship rendering
This commit is contained in:
parent
4a253b0184
commit
704c82838a
15 changed files with 199 additions and 13 deletions
13
js/world/spawn.mjs
Normal file
13
js/world/spawn.mjs
Normal file
|
@ -0,0 +1,13 @@
|
|||
import Ship from './ship.mjs';
|
||||
import Module from './module.mjs';
|
||||
import {modules} from '../data.mjs';
|
||||
import * as world from './index.mjs';
|
||||
|
||||
export function player() {
|
||||
let ship = new Ship(0, 0);
|
||||
ship.addModule(0, 0, modules.capsule.small);
|
||||
ship.addModule(0, 1, modules.fuel.small, { filled: true });
|
||||
ship.addModule(0, 2, modules.thruster.light);
|
||||
world.ships.add(ship);
|
||||
world.setPlayerShip(ship);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue