Adding tests for deprecated and moved functions
This commit is contained in:
parent
34dc5a0bc6
commit
be2aa62efc
4 changed files with 271 additions and 20 deletions
|
@ -7,21 +7,21 @@ var targetObjectTutoBubble ='myPopup1';
|
|||
var targetObjectTutoChat ='myPopup2';
|
||||
var popUpExplanation = undefined;
|
||||
function launchTuto (){
|
||||
WA.openPopup(targetObjectTutoBubble, textFirstPopup, [
|
||||
WA.ui.openPopup(targetObjectTutoBubble, textFirstPopup, [
|
||||
{
|
||||
label: "Next",
|
||||
className: "popUpElement",
|
||||
callback: (popup) => {
|
||||
popup.close();
|
||||
|
||||
WA.openPopup(targetObjectTutoChat, textSecondPopup, [
|
||||
WA.ui.openPopup(targetObjectTutoChat, textSecondPopup, [
|
||||
{
|
||||
label: "Open Chat",
|
||||
className: "popUpElement",
|
||||
callback: (popup1) => {
|
||||
WA.sendChatMessage("Hey you can talk here too ! ", 'WA Guide');
|
||||
WA.chat.sendChatMessage("Hey you can talk here too ! ", 'WA Guide');
|
||||
popup1.close();
|
||||
WA.restorePlayerControls();
|
||||
WA.controls.restorePlayerControls();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,32 +29,32 @@ function launchTuto (){
|
|||
}
|
||||
}
|
||||
]);
|
||||
WA.disablePlayerControls();
|
||||
WA.controls.disablePlayerControls();
|
||||
|
||||
}
|
||||
WA.onChatMessage((message => {
|
||||
WA.chat.onChatMessage((message => {
|
||||
console.log('CHAT MESSAGE RECEIVED BY SCRIPT');
|
||||
WA.sendChatMessage('Poly Parrot says: "'+message+'"', 'Poly Parrot');
|
||||
WA.chat.sendChatMessage('Poly Parrot says: "'+message+'"', 'Poly Parrot');
|
||||
}));
|
||||
|
||||
WA.onEnterZone('myTrigger', () => {
|
||||
WA.sendChatMessage("Don't step on my carpet!", 'Poly Parrot');
|
||||
WA.room.onEnterZone('myTrigger', () => {
|
||||
WA.chat.sendChatMessage("Don't step on my carpet!", 'Poly Parrot');
|
||||
})
|
||||
|
||||
WA.onLeaveZone('popupZone', () => {
|
||||
WA.room.onLeaveZone('popupZone', () => {
|
||||
})
|
||||
|
||||
WA.onEnterZone('notExist', () => {
|
||||
WA.sendChatMessage("YOU SHOULD NEVER SEE THIS", 'Poly Parrot');
|
||||
WA.room.onEnterZone('notExist', () => {
|
||||
WA.chat.sendChatMessage("YOU SHOULD NEVER SEE THIS", 'Poly Parrot');
|
||||
})
|
||||
|
||||
WA.onEnterZone('popupZone', () => {
|
||||
WA.displayBubble();
|
||||
WA.room.onEnterZone('popupZone', () => {
|
||||
WA.ui.displayBubble();
|
||||
if (!isFirstTimeTuto) {
|
||||
isFirstTimeTuto = true;
|
||||
launchTuto();
|
||||
}
|
||||
else popUpExplanation = WA.openPopup(targetObjectTutoChat,'Do you want to review the explanation ? ', [
|
||||
else popUpExplanation = WA.ui.openPopup(targetObjectTutoChat,'Do you want to review the explanation ? ', [
|
||||
{
|
||||
label: "No",
|
||||
className: "popUpElementReviewexplanation",
|
||||
|
@ -73,7 +73,7 @@ WA.onEnterZone('popupZone', () => {
|
|||
])
|
||||
});
|
||||
|
||||
WA.onLeaveZone('popupZone', () => {
|
||||
WA.room.onLeaveZone('popupZone', () => {
|
||||
if (popUpExplanation !== undefined) popUpExplanation.close();
|
||||
WA.removeBubble();
|
||||
WA.ui.removeBubble();
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue