create message to report
This commit is contained in:
parent
07c17452e7
commit
aeced0c648
6 changed files with 77 additions and 27 deletions
|
@ -601,6 +601,9 @@ export class GameScene extends ResizableScene implements CenterListener {
|
|||
this.connection.setSilent(true);
|
||||
}
|
||||
});
|
||||
|
||||
//lisen event to report user
|
||||
this.onReportUser();
|
||||
}
|
||||
|
||||
private switchLayoutMode(): void {
|
||||
|
@ -1181,4 +1184,10 @@ export class GameScene extends ResizableScene implements CenterListener {
|
|||
public onCenterChange(): void {
|
||||
this.updateCameraOffset();
|
||||
}
|
||||
|
||||
public onReportUser(){
|
||||
this.events.on('reportUser', (message: {reportedUserId: number, reportComment: string}) => {
|
||||
this.connection.emitReportPlayerMessage(message.reportedUserId, message.reportComment);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue