Max players
Options
Comments
-
1. To ensure that not too many clients are joining you would have to override the HandleJoinOperation method and check the current player count. Return an error if the game is full.
2. yes: dispose is called when releasing the last room reference (RoomCacheBase.ReleaseRoomReference)0 -
How do you get the count of players from the overridden operation?0
-
I see two options:
1)
LiteGame.HandleJoinOperation:this.Actors.Count
2)
Look at RoomCacheBase.ReleaseRoomReference, there is a check if the room is empty:if (roomInstance.ReferenceCount <= 0)
You could check if the room is full in RoomCacheBase.GetRoomReference the same way.0 -
Thanks, I was able to accomplish what I needed to do with the suggestions.0