diff --git a/front/src/Phaser/Game/SoundManager.ts b/front/src/Phaser/Game/SoundManager.ts index 62de69d5..f0210494 100644 --- a/front/src/Phaser/Game/SoundManager.ts +++ b/front/src/Phaser/Game/SoundManager.ts @@ -31,8 +31,7 @@ class SoundManager { } public stopSound(soundManager : BaseSoundManager,soundUrl : string){ - console.log("stop "+ soundManager.get(soundUrl).key); soundManager.get(soundUrl).stop(); } } -export const soundManager = new SoundManager(); \ No newline at end of file +export const soundManager = new SoundManager(); diff --git a/front/src/iframe_api.ts b/front/src/iframe_api.ts index 9f3bf68a..17b979df 100644 --- a/front/src/iframe_api.ts +++ b/front/src/iframe_api.ts @@ -81,7 +81,6 @@ export class Popup { export class Sound { constructor(private url: string) { - // TODO: send a "loadSound" event window.parent.postMessage({ "type" : 'loadSound', "data": { @@ -154,18 +153,6 @@ window.WA = { }, '*'); }, - /*playSound(url: string, config : SoundConfig) : string{ - window.parent.postMessage({ - "type" : 'playSound', - "data": { - url, - config - } as PlaySoundEvent - - },'*'); - return url; - },*/ - loadSound(url: string) : Sound { return new Sound(url); }, diff --git a/maps/Tuto/scriptTuto_BACKUP_1468.js b/maps/Tuto/scriptTuto_BACKUP_1468.js deleted file mode 100644 index f6ff5f6d..00000000 --- a/maps/Tuto/scriptTuto_BACKUP_1468.js +++ /dev/null @@ -1,87 +0,0 @@ -var isFirstTimeTuto = false; -var textFirstPopup = 'Hey ! This is how to start a discussion with someone ! You can be 4 max in a bubble.'; -var textSecondPopup = 'You can also use the chat to communicate ! '; -var targetObjectTutoBubble ='Tutobubble'; -var targetObjectTutoChat ='tutoChat'; -var targetObjectTutoExplanation ='tutoExplanation'; -var popUpExplanation = undefined; -var enterSoundUrl = "webrtc-in.mp3"; -var exitSoundUrl = "webrtc-out.mp3"; -var soundConfig = { - volume : 0.2, - loop : false -} -function launchTuto (){ - WA.openPopup(targetObjectTutoBubble, textFirstPopup, [ - { - label: "Next", - className: "popUpElement", - callback: (popup) => { - popup.close(); - - WA.openPopup(targetObjectTutoChat, textSecondPopup, [ - { - label: "Open Chat", - className: "popUpElement", - callback: (popup1) => { - WA.sendChatMessage("Hey you can talk here too!", 'WA Guide'); - popup1.close(); - WA.openPopup("TutoFinal","You are good to go! Go through the gate to meet the dev team and discover the features !",[ - { - label: "Got it!", - className : "success",callback:(popup2 => { - popup2.close(); -<<<<<<< HEAD - WA.restorePlayerControl(); - WA.loadSound(winSoundUrl).play(soundConfig); -======= - WA.restorePlayerControls(); ->>>>>>> b57a9957a3f43b0f0d431ffa824402e1a16a3cec - }) - } - ]) - } - } - - ]) - } - } - ]); - WA.disablePlayerControls(); - -} - - -WA.onEnterZone('popupZone', () => { - WA.displayBubble(); - WA.loadSound(enterSoundUrl).play(soundConfig); - if (!isFirstTimeTuto) { - isFirstTimeTuto = true; - launchTuto(); - } - else { - popUpExplanation = WA.openPopup(targetObjectTutoExplanation, 'Do you want to review the explanation?', [ - { - label: "No", - className: "error", - callback: (popup) => { - popup.close(); - } - }, - { - label: "Yes", - className: "success", - callback: (popup) => { - popup.close(); - launchTuto(); - } - } - ]) - } -}); - -WA.onLeaveZone('popupZone', () => { - if (popUpExplanation !== undefined) popUpExplanation.close(); - WA.removeBubble(); - WA.loadSound(exitSoundUrl).play(soundConfig); -}) diff --git a/maps/Tuto/scriptTuto_BASE_1468.js b/maps/Tuto/scriptTuto_BASE_1468.js deleted file mode 100644 index 869ec447..00000000 --- a/maps/Tuto/scriptTuto_BASE_1468.js +++ /dev/null @@ -1,74 +0,0 @@ -var isFirstTimeTuto = false; -var textFirstPopup = 'Hey ! This is how to start a discussion with someone ! You can be 4 max in a bubble.'; -var textSecondPopup = 'You can also use the chat to communicate ! '; -var targetObjectTutoBubble ='Tutobubble'; -var targetObjectTutoChat ='tutoChat'; -var targetObjectTutoExplanation ='tutoExplanation'; -var popUpExplanation = undefined; -function launchTuto (){ - WA.openPopup(targetObjectTutoBubble, textFirstPopup, [ - { - label: "Next", - className: "popUpElement", - callback: (popup) => { - popup.close(); - - WA.openPopup(targetObjectTutoChat, textSecondPopup, [ - { - label: "Open Chat", - className: "popUpElement", - callback: (popup1) => { - WA.sendChatMessage("Hey you can talk here too!", 'WA Guide'); - popup1.close(); - WA.openPopup("TutoFinal","You are good to go! Go through the gate to meet the dev team and discover the features !",[ - { - label: "Got it!", - className : "success",callback:(popup2 => { - popup2.close(); - WA.restorePlayerControl(); - }) - } - ]) - } - } - - ]) - } - } - ]); - WA.disablePlayerControl(); - -} - - -WA.onEnterZone('popupZone', () => { - WA.displayBubble(); - if (!isFirstTimeTuto) { - isFirstTimeTuto = true; - launchTuto(); - } - else { - popUpExplanation = WA.openPopup(targetObjectTutoExplanation, 'Do you want to review the explanation?', [ - { - label: "No", - className: "error", - callback: (popup) => { - popup.close(); - } - }, - { - label: "Yes", - className: "success", - callback: (popup) => { - popup.close(); - launchTuto(); - } - } - ]) - } -}); - -WA.onLeaveZone('popupZone', () => { - if (popUpExplanation !== undefined) popUpExplanation.close(); - WA.removeBubble(); -}) diff --git a/maps/Tuto/scriptTuto_LOCAL_1468.js b/maps/Tuto/scriptTuto_LOCAL_1468.js deleted file mode 100644 index 8821134b..00000000 --- a/maps/Tuto/scriptTuto_LOCAL_1468.js +++ /dev/null @@ -1,83 +0,0 @@ -var isFirstTimeTuto = false; -var textFirstPopup = 'Hey ! This is how to start a discussion with someone ! You can be 4 max in a bubble.'; -var textSecondPopup = 'You can also use the chat to communicate ! '; -var targetObjectTutoBubble ='Tutobubble'; -var targetObjectTutoChat ='tutoChat'; -var targetObjectTutoExplanation ='tutoExplanation'; -var popUpExplanation = undefined; -var enterSoundUrl = "webrtc-in.mp3"; -var exitSoundUrl = "webrtc-out.mp3"; -var soundConfig = { - volume : 0.2, - loop : false -} -function launchTuto (){ - WA.openPopup(targetObjectTutoBubble, textFirstPopup, [ - { - label: "Next", - className: "popUpElement", - callback: (popup) => { - popup.close(); - - WA.openPopup(targetObjectTutoChat, textSecondPopup, [ - { - label: "Open Chat", - className: "popUpElement", - callback: (popup1) => { - WA.sendChatMessage("Hey you can talk here too!", 'WA Guide'); - popup1.close(); - WA.openPopup("TutoFinal","You are good to go! Go through the gate to meet the dev team and discover the features !",[ - { - label: "Got it!", - className : "success",callback:(popup2 => { - popup2.close(); - WA.restorePlayerControl(); - WA.loadSound(winSoundUrl).play(soundConfig); - }) - } - ]) - } - } - - ]) - } - } - ]); - WA.disablePlayerControl(); - -} - - -WA.onEnterZone('popupZone', () => { - WA.displayBubble(); - WA.loadSound(enterSoundUrl).play(soundConfig); - if (!isFirstTimeTuto) { - isFirstTimeTuto = true; - launchTuto(); - } - else { - popUpExplanation = WA.openPopup(targetObjectTutoExplanation, 'Do you want to review the explanation?', [ - { - label: "No", - className: "error", - callback: (popup) => { - popup.close(); - } - }, - { - label: "Yes", - className: "success", - callback: (popup) => { - popup.close(); - launchTuto(); - } - } - ]) - } -}); - -WA.onLeaveZone('popupZone', () => { - if (popUpExplanation !== undefined) popUpExplanation.close(); - WA.removeBubble(); - WA.loadSound(exitSoundUrl).play(soundConfig); -}) diff --git a/maps/Tuto/scriptTuto_REMOTE_1468.js b/maps/Tuto/scriptTuto_REMOTE_1468.js deleted file mode 100644 index 65962a94..00000000 --- a/maps/Tuto/scriptTuto_REMOTE_1468.js +++ /dev/null @@ -1,74 +0,0 @@ -var isFirstTimeTuto = false; -var textFirstPopup = 'Hey ! This is how to start a discussion with someone ! You can be 4 max in a bubble.'; -var textSecondPopup = 'You can also use the chat to communicate ! '; -var targetObjectTutoBubble ='Tutobubble'; -var targetObjectTutoChat ='tutoChat'; -var targetObjectTutoExplanation ='tutoExplanation'; -var popUpExplanation = undefined; -function launchTuto (){ - WA.openPopup(targetObjectTutoBubble, textFirstPopup, [ - { - label: "Next", - className: "popUpElement", - callback: (popup) => { - popup.close(); - - WA.openPopup(targetObjectTutoChat, textSecondPopup, [ - { - label: "Open Chat", - className: "popUpElement", - callback: (popup1) => { - WA.sendChatMessage("Hey you can talk here too!", 'WA Guide'); - popup1.close(); - WA.openPopup("TutoFinal","You are good to go! Go through the gate to meet the dev team and discover the features !",[ - { - label: "Got it!", - className : "success",callback:(popup2 => { - popup2.close(); - WA.restorePlayerControls(); - }) - } - ]) - } - } - - ]) - } - } - ]); - WA.disablePlayerControls(); - -} - - -WA.onEnterZone('popupZone', () => { - WA.displayBubble(); - if (!isFirstTimeTuto) { - isFirstTimeTuto = true; - launchTuto(); - } - else { - popUpExplanation = WA.openPopup(targetObjectTutoExplanation, 'Do you want to review the explanation?', [ - { - label: "No", - className: "error", - callback: (popup) => { - popup.close(); - } - }, - { - label: "Yes", - className: "success", - callback: (popup) => { - popup.close(); - launchTuto(); - } - } - ]) - } -}); - -WA.onLeaveZone('popupZone', () => { - if (popUpExplanation !== undefined) popUpExplanation.close(); - WA.removeBubble(); -})