Adding the notion of silent zone

This commit is contained in:
David Négrier 2020-08-31 14:10:01 +02:00
parent df7b5cc2e3
commit 9351719873
3 changed files with 20 additions and 3 deletions

View file

@ -450,6 +450,14 @@ export class GameScene extends Phaser.Scene implements CenterListener {
}));
this.connection.setSilent(true);
}
})
this.gameMap.onPropertyChange('silent', (newValue, oldValue) => {
if (newValue === undefined || newValue === false || newValue === '') {
this.connection.setSilent(false);
} else {
this.connection.setSilent(true);
}
});
}