partey_workadventure/front/src/Api/iframe/zone-events.ts

28 lines
642 B
TypeScript
Raw Normal View History

import { EnterLeaveEvent, isEnterLeaveEvent } from '../Events/EnterLeaveEvent'
import { registerWorkadventureCommand, registerWorkadvntureCallback, sendToWorkadventure } from "./iframe-registration"
class WorkadventureZoneCommands {
onEnterZone(name: string, callback: () => void): void {
}
onLeaveZone(name: string, callback: () => void): void {
}
}
export const commands = registerWorkadventureCommand(new WorkadventureZoneCommands())
export const callbacks = registerWorkadvntureCallback([{
callback: (enterEvent: EnterLeaveEvent) => {
},
type: "enterEvent",
typeChecker: isEnterLeaveEvent
},])