Removed old maps and add starter-kit map

This commit is contained in:
Valdo Romao 2021-09-23 12:29:14 +01:00
parent 3f954d273c
commit e8ba9e9785
69 changed files with 540 additions and 8505 deletions

18
maps/starter/script.ts Normal file
View file

@ -0,0 +1,18 @@
/// <reference path="../node_modules/@workadventure/iframe-api-typings/iframe_api.d.ts" />
let currentPopup: any = undefined;
const today = new Date();
const time = today.getHours() + ":" + today.getMinutes();
WA.room.onEnterZone('clock', () => {
currentPopup = WA.ui.openPopup("clockPopup","It's " + time,[]);
})
WA.room.onLeaveZone('clock', closePopUp)
function closePopUp(){
if (currentPopup !== undefined) {
currentPopup.close();
currentPopup = undefined;
}
}