Class LobbyZoneManager
Handles visual effects in the lobby.
public class LobbyZoneManager : IHostedService, ILevelHostedService, IEventListener<QuestObjectInteracted>, ILayoutStartingListener, IEventListener<PlayerTeamChanged>, IEventListener<PlayerLeft>
- Inheritance
-
LobbyZoneManager
- Implements
- Inherited Members
Constructors
LobbyZoneManager(ZoneStore, LobbyConfiguration, IFactionDataStore, ILogger<LobbyZoneManager>, WarfareModule, ITeamSelectorBehavior, IPlayerService, OptionsUI, LayoutFactory)
public LobbyZoneManager(ZoneStore zoneStore, LobbyConfiguration lobbyConfig, IFactionDataStore factionDataStore, ILogger<LobbyZoneManager> logger, WarfareModule module, ITeamSelectorBehavior behavior, IPlayerService playerService, OptionsUI optionsUi, LayoutFactory layoutFactory)
Parameters
zoneStoreZoneStorelobbyConfigLobbyConfigurationfactionDataStoreIFactionDataStoreloggerILogger<LobbyZoneManager>moduleWarfareModulebehaviorITeamSelectorBehaviorplayerServiceIPlayerServiceoptionsUiOptionsUIlayoutFactoryLayoutFactory
Properties
Disabled
If the lobby is disabled.
public bool Disabled { get; }
Property Value
Remarks
Added this so older maps can be loaded in the mean time before their lobby is upgraded.
JoinDelay
Number of seconds to wait until joining the team.
public TimeSpan JoinDelay { get; }
Property Value
Methods
GetActivePlayerCount()
Gets the total of all players on a team.
public int GetActivePlayerCount()
Returns
GetLobbyZone()
Gets a reference to the zone being used as the lobby zone.
public Zone? GetLobbyZone()
Returns
GetTeamPlayerCount(int)
Gets the total cached player count on a single team.
public int GetTeamPlayerCount(int teamIndex)
Parameters
teamIndexint
Returns
Remarks
Out of bounds indices just return 0.
JoinLobbyAsync(WarfarePlayer, CancellationToken)
Teleport a player to the lobby and leave their group.
public UniTask JoinLobbyAsync(WarfarePlayer player, CancellationToken token = default)
Parameters
playerWarfarePlayertokenCancellationToken
Returns
- UniTask
StartJoiningTeam(WarfarePlayer, int)
public void StartJoiningTeam(WarfarePlayer player, int teamIndex)
Parameters
playerWarfarePlayerteamIndexint