Merge branch 'master' into develop
This commit is contained in:
commit
4b4356e7ff
7 changed files with 66 additions and 27 deletions
|
@ -104,6 +104,15 @@ export class GameRoom {
|
|||
public getUserById(id: number): User | undefined {
|
||||
return this.users.get(id);
|
||||
}
|
||||
public getUsersByUuid(uuid: string): User[] {
|
||||
const userList: User[] = [];
|
||||
for (const user of this.users.values()) {
|
||||
if (user.uuid === uuid) {
|
||||
userList.push(user);
|
||||
}
|
||||
}
|
||||
return userList;
|
||||
}
|
||||
|
||||
public join(socket: UserSocket, joinRoomMessage: JoinRoomMessage): User {
|
||||
const positionMessage = joinRoomMessage.getPositionmessage();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue