Table of Contents

Class LeaderboardPhase

Namespace
Uncreated.Warfare.Layouts.Phases
Assembly
Uncreated.Warfare.dll

Handles showing the leaderboard and keeping up with stats.

public class LeaderboardPhase : BasePhase<PhaseTeamSettings>, ILayoutPhase, IEventListener<PlayerExitedZone>, IDisposable, IEventListener<PlayerJoined>, IEventListener<PlayerTeamChanged>
Inheritance
LeaderboardPhase
Implements
Inherited Members

Constructors

LeaderboardPhase(IServiceProvider, IConfiguration)

public LeaderboardPhase(IServiceProvider serviceProvider, IConfiguration config)

Parameters

serviceProvider IServiceProvider
config IConfiguration

Properties

PlayerStats

[UsedImplicitly]
public LeaderboardPhaseStatInfo[] PlayerStats { get; set; }

Property Value

LeaderboardPhaseStatInfo[]

PlayerStatsPath

[UsedImplicitly]
public string? PlayerStatsPath { get; set; }

Property Value

string

ValuablePlayers

[UsedImplicitly]
public ValuablePlayerInfo[] ValuablePlayers { get; set; }

Property Value

ValuablePlayerInfo[]

Methods

AddToOfflineStat(int, double, CSteamID, Team)

public void AddToOfflineStat(int index, double amount, CSteamID steam64, Team team)

Parameters

index int
amount double
steam64 CSteamID
team Team

BeginPhaseAsync(CancellationToken)

Activates the phase. This should happen just after the old phase ended if there was one.

public override UniTask BeginPhaseAsync(CancellationToken token = default)

Parameters

token CancellationToken

Returns

UniTask

Remarks

Must set IsActive to true or the phase will be skipped.

CreateLeaderboardSets()

public virtual LeaderboardSet[] CreateLeaderboardSets()

Returns

LeaderboardSet[]

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

EndPhaseAsync(CancellationToken)

Deactivates the phase.

public override UniTask EndPhaseAsync(CancellationToken token = default)

Parameters

token CancellationToken

Returns

UniTask

GetStatIndex(string?)

public int GetStatIndex(string? statName)

Parameters

statName string

Returns

int

InitializePhaseAsync(CancellationToken)

Invoked before the layout starts. Meant to be used for loading extra configuration information.

public override UniTask InitializePhaseAsync(CancellationToken token = default)

Parameters

token CancellationToken

Returns

UniTask