mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 06:05:46 +03:00
Added Stats.Set
This commit is contained in:
parent
0a115f8ea4
commit
3002419af0
@ -59,6 +59,38 @@ public double GetGlobalFloat( string name )
|
||||
return data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set a stat value. This will automatically call StoreStats() after a successful call
|
||||
/// unless you pass false as the last argument.
|
||||
/// </summary>
|
||||
public bool Set( string name, int value, bool store = true )
|
||||
{
|
||||
var r = client.native.userstats.SetStat( name, value );
|
||||
|
||||
if ( store )
|
||||
{
|
||||
return r && client.native.userstats.StoreStats();
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set a stat value. This will automatically call StoreStats() after a successful call
|
||||
/// unless you pass false as the last argument.
|
||||
/// </summary>
|
||||
public bool Set( string name, float value, bool store = true )
|
||||
{
|
||||
var r = client.native.userstats.SetStat0( name, value );
|
||||
|
||||
if ( store )
|
||||
{
|
||||
return r && client.native.userstats.StoreStats();
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
client = null;
|
||||
|
Loading…
Reference in New Issue
Block a user