Browse Source

Merge branch 'master' of github.com:thecodingmachine/workadventure-map-starter-kit

master
Valdo Romao 5 months ago
parent
commit
5cdcf540f5
  1. 4
      README.md
  2. 7
      src/index.ts

4
README.md

@ -19,7 +19,7 @@ The project will run at http://localhost:8080/ @@ -19,7 +19,7 @@ The project will run at http://localhost:8080/
## Licenses
This project contains multiple licenses:
This project contains multiple licenses as follows:
* [Code license](./LICENSE.code) *(all files except those for other licenses)*
* [Map license](./LICENSE.map) *(`map.json` and the map visual as well)*
@ -29,4 +29,4 @@ This project contains multiple licenses: @@ -29,4 +29,4 @@ This project contains multiple licenses:
If you add third party assets in your map, do not forget to:
1. Credit the author and license with the "tilesetCopyright" property present in the properties of each tilesets in the `map.json` file
2. Add the license text in LICENSE.assets
2. Add the license text in LICENSE.assets

7
src/index.ts

@ -6,12 +6,11 @@ import {bootstrapExtra} from "@workadventure/scripting-api-extra"; @@ -6,12 +6,11 @@ import {bootstrapExtra} from "@workadventure/scripting-api-extra";
bootstrapExtra().catch(e => console.error(e));
let currentPopup: any = undefined;
const today = new Date();
const time = today.getHours() + ":" + today.getMinutes();
WA.room.onEnterLayer('clockZone').subscribe(() => {
console.log('toto')
currentPopup = WA.ui.openPopup("clockPopup","It's " + time,[]);
const today = new Date();
const time = today.getHours() + ":" + today.getMinutes();
currentPopup = WA.ui.openPopup("clockPopup","It's " + time,[]);
})
WA.room.onLeaveLayer('clockZone').subscribe(closePopUp)

Loading…
Cancel
Save