Add instructions
This commit is contained in:
parent
60f77c36a9
commit
2959c39da7
10 changed files with 119 additions and 21 deletions
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue