Adding the abaility to track users entering/leaving a zone in the script language.
This commit is contained in:
parent
6fbf165c91
commit
2bef328d8a
6 changed files with 103 additions and 8 deletions
|
@ -725,6 +725,14 @@ export class GameScene extends ResizableScene implements CenterListener {
|
|||
this.playAudio(newValue, true);
|
||||
});
|
||||
|
||||
this.gameMap.onPropertyChange('zone', (newValue, oldValue) => {
|
||||
if (newValue === undefined || newValue === false || newValue === '') {
|
||||
iframeListener.sendLeaveEvent(oldValue as string);
|
||||
} else {
|
||||
iframeListener.sendEnterEvent(newValue as string);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private onMapExit(exitKey: string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue