Removed old maps and add starter-kit map
This commit is contained in:
parent
3f954d273c
commit
e8ba9e9785
69 changed files with 540 additions and 8505 deletions
18
maps/starter/script.ts
Normal file
18
maps/starter/script.ts
Normal 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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue