mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-02-04 17:50:43 +03:00
Added Friend.GetStatInt
This commit is contained in:
parent
7c20b57957
commit
2928939c9f
@ -211,5 +211,21 @@ namespace Steamworks
|
||||
return val;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a user stat. Must call RequestUserStats first.
|
||||
/// </summary>
|
||||
/// <param name="statName">The name of the stat you want to get</param>
|
||||
/// <param name="defult">Will return this value if not available</param>
|
||||
/// <returns>The value, or defult if not available</returns>
|
||||
public int GetStatInt( string statName, int defult = 0 )
|
||||
{
|
||||
var val = defult;
|
||||
|
||||
if ( !SteamUserStats.Internal.GetUserStat( Id, statName, ref val ) )
|
||||
return defult;
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user