partey_workadventure/front/src/Api/iframe/controls.ts
David Négrier bfcdd31ed2 Fixing NPM package generation
The generation was broken due to the refactoring in several classes (some of them where not properly exported).
Also, trying to generate the NPM package on every build now (to detect issues).
2021-06-30 10:15:55 +02:00

16 lines
506 B
TypeScript

import { IframeApiContribution, sendToWorkadventure } from "./IframeApiContribution";
export class WorkadventureControlsCommands extends IframeApiContribution<WorkadventureControlsCommands> {
callbacks = [];
disablePlayerControls(): void {
sendToWorkadventure({ type: "disablePlayerControls", data: null });
}
restorePlayerControls(): void {
sendToWorkadventure({ type: "restorePlayerControls", data: null });
}
}
export default new WorkadventureControlsCommands();