add github and discord

This commit is contained in:
Vick Scarlet
2021-11-13 01:24:04 +08:00
parent bff0109cc5
commit 05e02de3db
10 changed files with 340 additions and 24 deletions

View File

@@ -1,6 +1,19 @@
import App from './app.js';
import Life from './modules/life.js';
globalThis.goto = async tag => {
let url;
switch(tag) {
case 'github': url = 'https://github.com/VickScarlet/lifeRestart'; break;
case 'discord': url = 'https://discord.gg/U3qrf49NMQ'; break;
}
try {
window.open(url, '_blank');
} catch (error) {
console.error(error);
}
}
globalThis.$$eventMap = new Map();
globalThis.$$event = (tag, data) => {
const listener = $$eventMap.get(tag);
@@ -165,5 +178,5 @@ core.config({
],
},
},
})
});
game.start(query);