MultiplayerMinesweeper/www/scripts/net/status.js
2022-06-19 20:18:47 -04:00

18 lines
400 B
JavaScript

import {updateConnectionStatus} from "/scripts/interface/game/connection.js"
var SERVER_CONNECTION = "disconnected"
export function get() {
return SERVER_CONNECTION;
}
export function connected() {
SERVER_CONNECTION = "connected";
updateConnectionStatus(SERVER_CONNECTION);
}
export function disconnected() {
SERVER_CONNECTION = "disconnected";
updateConnectionStatus(SERVER_CONNECTION);
}