map village + popUp go to page
This commit is contained in:
parent
98aa94bb12
commit
39074511a4
26 changed files with 707 additions and 0 deletions
73
maps/Village/scriptMapVillage.js
Normal file
73
maps/Village/scriptMapVillage.js
Normal file
|
@ -0,0 +1,73 @@
|
|||
var zoneOfficeName = "popupOfficeZone";
|
||||
var zoneEventName = "popupEventZone";
|
||||
var zoneSchoolName = "popupSchoolZone";
|
||||
var zoneTCMName = "popupTCMZone";
|
||||
|
||||
var urlPricing = "https://workadventu.re/pricing";
|
||||
var urlSchoolOffer = "https://workadventu.re/school-offer";
|
||||
var currentPopup = undefined;
|
||||
|
||||
WA.onEnterZone(zoneOfficeName, () => {
|
||||
currentPopup = WA.openPopup("popUpOffice","You can purchase virtual office in WorkAdventure",[
|
||||
{
|
||||
label: "See the pricing",
|
||||
className: "popUpElement",
|
||||
callback: (popup => {
|
||||
WA.openTab(urlPricing);
|
||||
})
|
||||
}]);
|
||||
})
|
||||
|
||||
WA.onEnterZone(zoneEventName, () => {
|
||||
currentPopup = WA.openPopup("popUpEvent","You can create your own Event in WorkAdventure",[
|
||||
{
|
||||
label: "See the pricing",
|
||||
className: "popUpElement",
|
||||
callback: (popup => {
|
||||
WA.openTab(urlPricing);
|
||||
})
|
||||
}]);
|
||||
})
|
||||
|
||||
WA.onEnterZone(zoneTCMName, () => {
|
||||
currentPopup = WA.openPopup("popUpTCM","Come meet the TCM team in our office ! ",[]);
|
||||
})
|
||||
|
||||
|
||||
WA.onEnterZone(zoneSchoolName, () => {
|
||||
currentPopup = WA.openPopup("popUpSchool","WorkAdventure is free for teachers a the moment ! Take advantage of our offer ",[
|
||||
{
|
||||
label: "See the offer",
|
||||
className: "popUpElement",
|
||||
callback: (popup => {
|
||||
WA.openTab(urlSchoolOffer);
|
||||
})
|
||||
}]);
|
||||
})
|
||||
|
||||
WA.onLeaveZone(zoneSchoolName, () => {
|
||||
if (currentPopup !== undefined) {
|
||||
currentPopup.close();
|
||||
currentPopup = undefined;
|
||||
}
|
||||
})
|
||||
|
||||
WA.onLeaveZone(zoneTCMName, () => {
|
||||
if (currentPopup !== undefined) {
|
||||
currentPopup.close();
|
||||
currentPopup = undefined;
|
||||
}
|
||||
})
|
||||
|
||||
WA.onLeaveZone(zoneEventName, () => {
|
||||
if (currentPopup !== undefined) {
|
||||
currentPopup.close();
|
||||
currentPopup = undefined;
|
||||
}
|
||||
})
|
||||
WA.onLeaveZone(zoneOfficeName, () => {
|
||||
if (currentPopup !== undefined) {
|
||||
currentPopup.close();
|
||||
currentPopup = undefined;
|
||||
}
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue