Name of map users
- Add name on user - Delete NonPlayer class not used
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
export class Message {
|
||||
userId: string;
|
||||
roomId: string;
|
||||
name: string;
|
||||
|
||||
constructor(data: any) {
|
||||
if (!data.userId || !data.roomId) {
|
||||
@@ -8,12 +9,14 @@ export class Message {
|
||||
}
|
||||
this.userId = data.userId;
|
||||
this.roomId = data.roomId;
|
||||
this.name = data.name;
|
||||
}
|
||||
|
||||
toJson() {
|
||||
return {
|
||||
userId: this.userId,
|
||||
roomId: this.roomId
|
||||
roomId: this.roomId,
|
||||
name: this.name
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user