Better messaging and better rule implementation
All checks were successful
All checks were successful
This commit is contained in:
@@ -21,13 +21,13 @@ public class Lobby : RoomType
|
||||
|
||||
public override void OnConnect(ConnectionInstance connection)
|
||||
{
|
||||
var joinMessage = new JoinMessage(connection.Id, connection.Name + " has joined the room.");
|
||||
var joinMessage = new JoinMessage(_room.Connections, connection);
|
||||
_room.BroadCast(new RoomMessage<JoinMessage>("JOIN", joinMessage));
|
||||
}
|
||||
|
||||
public override void OnDisconnect(ConnectionInstance connection)
|
||||
{
|
||||
var leaveMessage = new LeaveMessage(connection.Id, connection.Name + " has left the room.");
|
||||
var leaveMessage = new LeaveMessage(connection);
|
||||
_room.BroadCast(new RoomMessage<LeaveMessage>("LEAVE", leaveMessage));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user