mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-26 06:35:49 +03:00
Enhanced AddScore description
This commit is contained in:
parent
d6b3966c9d
commit
6ce4e637d9
@ -132,7 +132,8 @@ internal void OnBoardCreated( LeaderboardFindResult_t result, bool error )
|
|||||||
/// Subscores are totally optional, and can be used for other game defined data such as laps etc.. although
|
/// Subscores are totally optional, and can be used for other game defined data such as laps etc.. although
|
||||||
/// they have no bearing on sorting at all
|
/// they have no bearing on sorting at all
|
||||||
/// If onlyIfBeatsOldScore is true, the score will only be updated if it beats the existing score, else it will always
|
/// If onlyIfBeatsOldScore is true, the score will only be updated if it beats the existing score, else it will always
|
||||||
/// be updated.
|
/// be updated. Beating the existing score is subjective - and depends on how your leaderboard was set up as to whether
|
||||||
|
/// that means higher or lower.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool AddScore( bool onlyIfBeatsOldScore, int score, params int[] subscores )
|
public bool AddScore( bool onlyIfBeatsOldScore, int score, params int[] subscores )
|
||||||
{
|
{
|
||||||
|
@ -490,7 +490,11 @@ public int NumMembers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void Leave()
|
public void Leave()
|
||||||
{
|
{
|
||||||
if (CurrentLobby != 0) { client.native.matchmaking.LeaveLobby(CurrentLobby); }
|
if (CurrentLobby != 0)
|
||||||
|
{
|
||||||
|
client.native.matchmaking.LeaveLobby(CurrentLobby);
|
||||||
|
}
|
||||||
|
|
||||||
CurrentLobby = 0;
|
CurrentLobby = 0;
|
||||||
CurrentLobbyData = null;
|
CurrentLobbyData = null;
|
||||||
}
|
}
|
||||||
@ -508,7 +512,6 @@ public void Dispose()
|
|||||||
/// <returns>Array of member SteamIDs</returns>
|
/// <returns>Array of member SteamIDs</returns>
|
||||||
public ulong[] GetMemberIDs()
|
public ulong[] GetMemberIDs()
|
||||||
{
|
{
|
||||||
|
|
||||||
ulong[] memIDs = new ulong[NumMembers];
|
ulong[] memIDs = new ulong[NumMembers];
|
||||||
for (int i = 0; i < NumMembers; i++)
|
for (int i = 0; i < NumMembers; i++)
|
||||||
{
|
{
|
||||||
@ -524,14 +527,15 @@ public ulong[] GetMemberIDs()
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool UserIsInCurrentLobby(ulong steamID)
|
public bool UserIsInCurrentLobby(ulong steamID)
|
||||||
{
|
{
|
||||||
if(CurrentLobby == 0) { return false; }
|
if ( CurrentLobby == 0 )
|
||||||
|
return false;
|
||||||
|
|
||||||
ulong[] mems = GetMemberIDs();
|
ulong[] mems = GetMemberIDs();
|
||||||
|
|
||||||
for (int i = 0; i < mems.Length; i++)
|
for (int i = 0; i < mems.Length; i++)
|
||||||
{
|
{
|
||||||
if(mems[i] == steamID)
|
if ( mems[i] == steamID )
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user