Add start of ship editing

This commit is contained in:
asraelite 2018-03-04 16:49:42 +00:00
parent d85338d9f2
commit b88c0eb358
18 changed files with 288 additions and 100 deletions

View file

@ -2,8 +2,34 @@ 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 edit from './edit.mjs';
export let shipLanded = false;
export function startGame() {
game.changeView('game');
graphics.perspective.focusPlayer();
}
export function landShip() {
shipLanded = true;
game.state.landed = true;
}
export function launchShip() {
shipLanded = false;
game.state.landed = false;
}
export function editShip() {
console.log('a');
graphics.changePerspective('parent', -5, 0);
game.state.editing = true;
edit.init();
}
export function endEditing() {
graphics.changePerspective('universe');
game.state.editing = false;
edit.end();
}