Send event and play animation with user frame
This commit is contained in:
@@ -7,5 +7,6 @@ export interface ExSocketInterface extends Socket {
|
||||
webRtcRoomId: string;
|
||||
userId: string;
|
||||
name: string;
|
||||
frame: string;
|
||||
position: PointInterface;
|
||||
}
|
||||
@@ -25,6 +25,7 @@ let RefreshUserPositionFunction = function(rooms : ExtRooms, Io: socketIO.Server
|
||||
roomId: socket.roomId,
|
||||
position: socket.position,
|
||||
name: socket.name,
|
||||
frame: socket.frame,
|
||||
};
|
||||
let dataArray = <any>[];
|
||||
if (mapPositionUserByRoom.get(data.roomId)) {
|
||||
|
||||
@@ -2,6 +2,7 @@ export class Message {
|
||||
userId: string;
|
||||
roomId: string;
|
||||
name: string;
|
||||
frame: string;
|
||||
|
||||
constructor(data: any) {
|
||||
if (!data.userId || !data.roomId) {
|
||||
@@ -10,13 +11,15 @@ export class Message {
|
||||
this.userId = data.userId;
|
||||
this.roomId = data.roomId;
|
||||
this.name = data.name;
|
||||
this.frame = data.frame;
|
||||
}
|
||||
|
||||
toJson() {
|
||||
return {
|
||||
userId: this.userId,
|
||||
roomId: this.roomId,
|
||||
name: this.name
|
||||
name: this.name,
|
||||
frame: this.frame
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user