ソースを参照

Sounds stop, log clears, and state resets when quitting

tags/v0.1.0
Fen Dweller 7年前
コミット
d96dc56004
1個のファイルの変更17行の追加12行の削除
  1. +17
    -12
      satiate.js

+ 17
- 12
satiate.js ファイルの表示

@@ -4,18 +4,7 @@ let activeModal = null;

const version = "pre-alpha";

let state = {
player: {
items: {
keys: [

]
},
rooms: {

}
}
}
let state;

function print(lines) {
(lines.concat([String.fromCharCode(160)])).forEach(line => {
@@ -56,6 +45,9 @@ function openModal(modal) {
}

function returnToStart() {
stopAllSound();
log.innerHTML = "";

document.querySelector("#game").classList.remove("scene");
document.querySelector("#game").classList.add("hidden-scene");
document.querySelector("#pick").classList.remove("hidden-scene");
@@ -65,6 +57,19 @@ function returnToStart() {
// set up the game

function init(story) {
state = {
player: {
items: {
keys: [

]
},
rooms: {

}
}
};
initWorld(story, state);
initAudio(story, state);
initGame(story, state);


読み込み中…
キャンセル
保存