Name of map users
- Add name on user - Delete NonPlayer class not used
This commit is contained in:
parent
8355a89dc5
commit
b65e37c468
10 changed files with 46 additions and 65 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue