mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 14:15:47 +03:00
Added Leaderboard.OnBoardInformation callback
This commit is contained in:
parent
6e807c8e4d
commit
d98f7fd1fe
@ -100,6 +100,11 @@ private bool DeferOnCreated( Action onValid, FailureCallback onFailure = null )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called when the leaderboard information is successfully recieved from Steam
|
||||||
|
/// </summary>
|
||||||
|
public Action OnBoardInformation;
|
||||||
|
|
||||||
internal void OnBoardCreated( LeaderboardFindResult_t result, bool error )
|
internal void OnBoardCreated( LeaderboardFindResult_t result, bool error )
|
||||||
{
|
{
|
||||||
if ( error || ( result.LeaderboardFound == 0 ) )
|
if ( error || ( result.LeaderboardFound == 0 ) )
|
||||||
@ -114,6 +119,8 @@ internal void OnBoardCreated( LeaderboardFindResult_t result, bool error )
|
|||||||
{
|
{
|
||||||
Name = client.native.userstats.GetLeaderboardName( BoardId );
|
Name = client.native.userstats.GetLeaderboardName( BoardId );
|
||||||
TotalEntries = client.native.userstats.GetLeaderboardEntryCount( BoardId );
|
TotalEntries = client.native.userstats.GetLeaderboardEntryCount( BoardId );
|
||||||
|
|
||||||
|
OnBoardInformation?.Invoke();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user