Implement disable/restore proximity meeting in api (#2166)
Co-authored-by: Alexis Faizeau <a.faizeau@workadventu.re>
This commit is contained in:
committed by
Alexis Faizeau
parent
b6e006d7bb
commit
f7caacc598
@@ -14,7 +14,7 @@ When controls are disabled, the user cannot move anymore using keyboard input. T
|
||||
|
||||
Example:
|
||||
|
||||
```javascript
|
||||
```ts
|
||||
WA.room.onEnterLayer('myZone').subscribe(() => {
|
||||
WA.controls.disablePlayerControls();
|
||||
WA.ui.openPopup("popupRectangle", 'This is an imporant message!', [{
|
||||
@@ -25,5 +25,28 @@ WA.room.onEnterLayer('myZone').subscribe(() => {
|
||||
popup.close();
|
||||
}
|
||||
}]);
|
||||
})
|
||||
});
|
||||
```
|
||||
|
||||
### Disabling / restoring proximity meeting
|
||||
|
||||
```
|
||||
WA.controls.disablePlayerProximityMeeting(): void
|
||||
WA.controls.restorePlayerProximityMeeting(): void
|
||||
```
|
||||
|
||||
These 2 methods can be used to completely disable player proximity meeting and to enable them again.
|
||||
|
||||
When proximity meeting are disabled, the user cannot speak with anyone.
|
||||
|
||||
Example:
|
||||
|
||||
```ts
|
||||
WA.room.onEnterLayer('myZone').subscribe(() => {
|
||||
WA.controls.disablePlayerProximityMeeting();
|
||||
});
|
||||
|
||||
WA.room.onLeaveLayer('myZone').subscribe(() => {
|
||||
WA.controls.restorePlayerProximityMeeting();
|
||||
});
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user