extraction idea
# Conflicts: # front/src/Api/ScriptUtils.ts # front/src/iframe_api.ts
This commit is contained in:
parent
fe573893a1
commit
1a1ab30574
4 changed files with 122 additions and 15 deletions
27
front/src/Api/iframe/zone-events.ts
Normal file
27
front/src/Api/iframe/zone-events.ts
Normal file
|
@ -0,0 +1,27 @@
|
|||
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
|
||||
},])
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue