mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-14 15:48:06 +03:00
Added Friend.GetAchievement
This commit is contained in:
parent
2928939c9f
commit
ae900f84bc
@ -227,5 +227,21 @@ namespace Steamworks
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a user achievement state. Must call RequestUserStats first.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="statName">The name of the achievement 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 bool GetAchievement( string statName, bool defult = false )
|
||||||
|
{
|
||||||
|
var val = defult;
|
||||||
|
|
||||||
|
if ( !SteamUserStats.Internal.GetUserAchievement( Id, statName, ref val ) )
|
||||||
|
return defult;
|
||||||
|
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user