Merge branch 'update-game-tiles' into metadataScriptingApi

This commit is contained in:
GRL 2021-05-21 15:56:35 +02:00
commit 796a9418d3
6 changed files with 79 additions and 42 deletions

View file

@ -26,8 +26,6 @@ interface WorkAdventureApi {
onEnterZone(name: string, callback: () => void): void;
onLeaveZone(name: string, callback: () => void): void;
openPopup(targetObject: string, message: string, buttons: ButtonDescriptor[]): Popup;
openTab(url: string): void;
goToPage(url: string): void;
openCoWebSite(url: string): void;
closeCoWebSite(): void;
disablePlayerControls() : void;
@ -167,7 +165,7 @@ window.WA = {
loadTileset(name: string, imgUrl : string, tilewidth : number, tileheight : number, margin : number, spacing : number): void {
postToParent({
type: "tilsetEvent",
type: "updateTileEvent",
data: {
name: name,
imgUrl: imgUrl,
@ -276,24 +274,6 @@ window.WA = {
window.parent.postMessage({ 'type': 'removeBubble' }, '*');
},
openTab(url: string): void {
window.parent.postMessage({
"type": 'openTab',
"data": {
url
} as OpenTabEvent
}, '*');
},
goToPage(url: string): void {
window.parent.postMessage({
"type": 'goToPage',
"data": {
url
} as GoToPageEvent
}, '*');
},
openCoWebSite(url: string): void {
window.parent.postMessage({
"type": 'openCoWebSite',