summaryrefslogtreecommitdiff
path: root/kartik/views/script/core_crash.js
blob: cc68b1823d54808de66d535ed433c1c8e1c7435e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
global.gameCrashed = false;
crashSound = new Audio("./sfx/gamecrash.wav");

function destroy() {
    global.gameCrashed = true;
    crashSound.play();
    document.getElementById("wb").outerHTML = "";
    try { musicElement.pause(); } catch (e) {}
}

function spawnError(crashReport) {
    document.getElementById("error-outer").style.display = "flex";
    document.getElementById("crash-dump").value = crashReport;
    destroy();
}