workadventure/front/src/Api/iframe/Player.ts
jonny 540e5783b6 cowebsite
navigation
sound
player
extraction
2021-05-28 01:14:10 +02:00

22 lines
593 B
TypeScript

import { IframeApiContribution, sendToWorkadventure } from './IframeApiContribution';
class WorkadventureNavigationCommands extends IframeApiContribution<WorkadventureNavigationCommands> {
readonly subObjectIdentifier = "player"
readonly addMethodsAtRoot = true
callbacks = []
disablePlayerControls(): void {
sendToWorkadventure({ 'type': 'disablePlayerControls', data: null });
}
restorePlayerControls(): void {
sendToWorkadventure({ 'type': 'restorePlayerControls', data: null });
}
}
export default new WorkadventureNavigationCommands();