diff --git a/README.md b/README.md index ee7bc17..8b170ac 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,33 @@ var server = new Facepunch.Steamworks.Server( 252490, 0, 28015, true, "MyGame453 This will register a secure server for game 252490, any ip, port 28015. Again, more usage in the Facepunch.Steamworks.Test project. +## Lobby + +To create a Lobby do this. +```csharp +var client = new Facepunch.Steamworks.Client( 252490 ); +client.Lobby.Create(Steamworks.Lobby.Type.Public, 10); +``` + +Created lobbies are auto-joined, but if you want to find a friend's lobby, you'd call +```csharp +client.LobbyList.Refresh(); +//wait for the callback +client.LobbyList.OnLobbiesUpdated = () => +{ + if (client.LobbyList.Finished) + { + foreach (LobbyList.Lobby lobby in client.LobbyList.Lobbies) + { + Console.WriteLine($"Found Lobby: {lobby.Name}"); + } + } +}; +//join a lobby you found +client.Lobby.Join(LobbyList.Lobbies[0]); +``` + + # Unity Yeah this works under Unity. That's half the point of it.