Skip to content

Commit

Permalink
Merge pull request #152 from colyseus/minor-updates
Browse files Browse the repository at this point in the history
Updated Example comment, OverrideSettings bug fix
  • Loading branch information
mitchLucid authored May 18, 2021
2 parents aa9a722 + 95faeb0 commit 6362b16
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Assets/Colyseus/Runtime/Example~/Scripts/ExampleManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ public void Initialize(string roomName, Dictionary<string, object> roomOptions)
}

/// <summary>
/// Connect to the Colyseus server and either join or create a room.
/// </summary>
/// /// Create a new <see cref="ColyseusClient"/> along with any other client initialization you may need to perform
/// /// </summary>
public override void InitializeClient()
{
base.InitializeClient();
Expand Down Expand Up @@ -147,9 +147,16 @@ public async void CreateNewRoom(string roomID)
await _roomController.CreateSpecificRoom(client, _roomController.roomName, roomID);
}

public void CreateNewRoom(string roomID, Dictionary<string, object> roomOptions)
{
_roomController.SetRoomOptions(roomOptions);

CreateNewRoom(roomID);
}

public async void JoinOrCreateRoom()
{
await _roomController.JoinOrCreateRoom();
await _roomController.JoinOrCreateRoom();
}

public async void LeaveAllRooms(Action onLeave)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ protected virtual void FixedUpdate()
public virtual void OverrideSettings(ColyseusSettings newSettings)
{
_colyseusSettings = newSettings;
_requests = new ColyseusRequest(_colyseusSettings);
}

/// <summary>
Expand Down

0 comments on commit 6362b16

Please sign in to comment.