Refactoring WorkAdventureAPI.

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)
This commit is contained in:
David Négrier 2021-06-18 17:22:56 +02:00
parent 97e6ad6700
commit 34dc5a0bc6
13 changed files with 186 additions and 153 deletions

View file

@ -1,22 +0,0 @@
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();