detecting zoe enter and leave events

This commit is contained in:
Hanusiak Piotr 2021-12-01 14:48:14 +01:00
parent 936a6bfeec
commit eb95e2e483
7 changed files with 526 additions and 347 deletions

View file

@ -778,6 +778,28 @@ export class GameScene extends DirtyScene {
iframeListener.sendLeaveLayerEvent(layer.name);
});
});
this.gameMap.onEnterZone((zones) => {
console.log('enter zones');
console.log(zones);
// zones.forEach((zone) => {
// iframeListener.sendEnterLayerEvent(zone.name);
// });
});
this.gameMap.onLeaveZone((zones) => {
console.log('leave zones');
console.log(zones);
// zones.forEach((zone) => {
// iframeListener.sendEnterLayerEvent(zone.name);
// });
});
// this.gameMap.onLeaveLayer((layers) => {
// layers.forEach((layer) => {
// iframeListener.sendLeaveLayerEvent(layer.name);
// });
// });
});
}