Add instructions

This commit is contained in:
asraelite 2018-03-07 15:56:10 +00:00
parent 60f77c36a9
commit 2959c39da7
10 changed files with 119 additions and 21 deletions

View file

@ -41,12 +41,17 @@ export function changeView(view) {
state.view = view;
gui.changeView(view);
if (view == 'game') {
if (view === 'game') {
state.playing = true;
state.editing = false;
state.paused = false;
world.init();
inventory.init();
} else if (view === 'instructions') {
state.playing = false;
gui.changeView('instructions');
} else if (view === 'menu') {
gui.changeView('menu');
}
}