Restructuring of the files
This commit is contained in:
22
Facepunch.Steamworks/Structs/LeaderboardUpdate.cs
Normal file
22
Facepunch.Steamworks/Structs/LeaderboardUpdate.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace Facepunch.Steamworks.Data
|
||||
{
|
||||
public struct LeaderboardUpdate
|
||||
{
|
||||
public int Score;
|
||||
public bool Changed;
|
||||
public int NewGlobalRank;
|
||||
public int OldGlobalRank;
|
||||
public int RankChange => NewGlobalRank - OldGlobalRank;
|
||||
|
||||
internal static LeaderboardUpdate From( LeaderboardScoreUploaded_t e ) =>
|
||||
new LeaderboardUpdate
|
||||
{
|
||||
Score = e.Score,
|
||||
Changed = e.ScoreChanged == 1,
|
||||
NewGlobalRank = e.GlobalRankNew,
|
||||
OldGlobalRank = e.GlobalRankPrevious
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user