コード例 #1
0
        public override void OnResuming(IScreen last)
        {
            base.OnResuming(last);

            // Upon having left a room, we don't know whether we were the only participant, and whether the room is now closed as a result of leaving it.
            // To work around this, temporarily remove the room and trigger an immediate listing poll.
            if (last is MultiplayerMatchSubScreen match)
            {
                RoomManager.RemoveRoom(match.Room);
                ListingPollingComponent.PollImmediately();
            }
        }
コード例 #2
0
 protected override IEnumerable <RoomPollingComponent> CreatePollingComponents() => new RoomPollingComponent[]
 {
     listingPollingComponent = new MultiplayerListingPollingComponent
     {
         TimeBetweenPolls = { BindTarget = TimeBetweenListingPolls },
         AllowPolling     = { BindTarget = allowPolling }
     },
     new MultiplayerSelectionPollingComponent
     {
         TimeBetweenPolls = { BindTarget = TimeBetweenSelectionPolls },
         AllowPolling     = { BindTarget = allowPolling }
     }
 };