Simplifying a lot what was done (even if the new code is a bit less automated, it allows to list exactly the methods we want to see deprecated and to add a notification message)
16 lines
503 B
TypeScript
16 lines
503 B
TypeScript
import { IframeApiContribution, sendToWorkadventure } from './IframeApiContribution';
|
|
|
|
class WorkadventureControlsCommands extends IframeApiContribution<WorkadventureControlsCommands> {
|
|
callbacks = []
|
|
|
|
disablePlayerControls(): void {
|
|
sendToWorkadventure({ 'type': 'disablePlayerControls', data: null });
|
|
}
|
|
|
|
restorePlayerControls(): void {
|
|
sendToWorkadventure({ 'type': 'restorePlayerControls', data: null });
|
|
}
|
|
}
|
|
|
|
|
|
export default new WorkadventureControlsCommands();
|