Can play Sound from a map script
add sound in the TutoMap
This commit is contained in:
parent
676dbcc9d0
commit
517c0e86cb
6 changed files with 92 additions and 0 deletions
|
@ -39,6 +39,7 @@ import {mediaManager} from "../../WebRtc/MediaManager";
|
|||
import {ItemFactoryInterface} from "../Items/ItemFactoryInterface";
|
||||
import {ActionableItem} from "../Items/ActionableItem";
|
||||
import {UserInputManager} from "../UserInput/UserInputManager";
|
||||
import {soundManager} from "./SoundManager";
|
||||
import {UserMovedMessage} from "../../Messages/generated/messages_pb";
|
||||
import {ProtobufClientUtils} from "../../Network/ProtobufClientUtils";
|
||||
import {connectionManager} from "../../Connexion/ConnectionManager";
|
||||
|
@ -793,6 +794,11 @@ ${escapedMessage}
|
|||
this.userInputManager.disableControls();
|
||||
}));
|
||||
|
||||
this.iframeSubscriptionList.push(iframeListener.playSoundStream.subscribe((playSoundEvent)=>
|
||||
{
|
||||
soundManager.playSound(this.load,this.sound,playSoundEvent.url,playSoundEvent.config);
|
||||
}))
|
||||
|
||||
this.iframeSubscriptionList.push(iframeListener.enablePlayerControlStream.subscribe(()=>{
|
||||
this.userInputManager.restoreControls();
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue