mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 06:05:46 +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
|
||||
/// 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
|
||||
/// 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>
|
||||
public bool AddScore( bool onlyIfBeatsOldScore, int score, params int[] subscores )
|
||||
{
|
||||
|
@ -490,7 +490,11 @@ public int NumMembers
|
||||
/// </summary>
|
||||
public void Leave()
|
||||
{
|
||||
if (CurrentLobby != 0) { client.native.matchmaking.LeaveLobby(CurrentLobby); }
|
||||
if (CurrentLobby != 0)
|
||||
{
|
||||
client.native.matchmaking.LeaveLobby(CurrentLobby);
|
||||
}
|
||||
|
||||
CurrentLobby = 0;
|
||||
CurrentLobbyData = null;
|
||||
}
|
||||
@ -508,7 +512,6 @@ public void Dispose()
|
||||
/// <returns>Array of member SteamIDs</returns>
|
||||
public ulong[] GetMemberIDs()
|
||||
{
|
||||
|
||||
ulong[] memIDs = new ulong[NumMembers];
|
||||
for (int i = 0; i < NumMembers; i++)
|
||||
{
|
||||
@ -524,15 +527,16 @@ public ulong[] GetMemberIDs()
|
||||
/// <returns></returns>
|
||||
public bool UserIsInCurrentLobby(ulong steamID)
|
||||
{
|
||||
if(CurrentLobby == 0) { return false; }
|
||||
if ( CurrentLobby == 0 )
|
||||
return false;
|
||||
|
||||
ulong[] mems = GetMemberIDs();
|
||||
|
||||
for (int i = 0; i < mems.Length; i++)
|
||||
{
|
||||
if(mems[i] == steamID)
|
||||
{
|
||||
if ( mems[i] == steamID )
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user