Enhanced AddScore description

This commit is contained in:
Garry Newman 2017-12-06 12:34:21 +00:00
parent d6b3966c9d
commit 6ce4e637d9
2 changed files with 12 additions and 7 deletions

View File

@ -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 )
{ {

View File

@ -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,15 +527,16 @@ 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;
} }