public void FindLeaderboard(OnLeaderboardRetrieved onLeaderboardRetrieved, string leaderboardName) { Leaderboard leaderboard1 = (Leaderboard)null; foreach (Leaderboard leaderboard2 in this._leaderboardList) { if (leaderboard2.LeaderboardName == leaderboardName) { leaderboard1 = leaderboard2; break; } } if (leaderboard1 != null) { onLeaderboardRetrieved(leaderboard1); } else { this._onLeaderboardRetrieved = onLeaderboardRetrieved; if (this._internalOnLeaderboardRetrieved == null) { this._internalOnLeaderboardRetrieved = new OnLeaderboardRetrievedFromSteam(this.OnLeaderboardRetrievedCallback); } if (Leaderboards.SteamUnityAPI_SteamUserStats_FindLeaderboard(this._stats, leaderboardName, Marshal.GetFunctionPointerForDelegate((Delegate)this._internalOnLeaderboardRetrieved))) { return; } this._onLeaderboardRetrieved((Leaderboard)null); } }
public void Refresh(OnLeaderboardRetrieved onLeaderboardRefreshComplete) { this._onLeaderboardRetrieved = onLeaderboardRefreshComplete; if (this._internalOnLeaderboardRetrieved == null) { this._internalOnLeaderboardRetrieved = new OnLeaderboardRetrievedFromSteam(this.OnLeaderboardRetrievedCallback); } if (Leaderboard.SteamUnityAPI_SteamUserStats_FindLeaderboard(this._stats, this._leaderboardName, Marshal.GetFunctionPointerForDelegate((Delegate)this._internalOnLeaderboardRetrieved))) { return; } this._onLeaderboardRetrieved(this); }
public void Refresh(OnLeaderboardRetrieved onLeaderboardRefreshComplete) { this._onLeaderboardRetrieved = onLeaderboardRefreshComplete; if (this._internalOnLeaderboardRetrieved == null) this._internalOnLeaderboardRetrieved = new OnLeaderboardRetrievedFromSteam(this.OnLeaderboardRetrievedCallback); if (Leaderboard.SteamUnityAPI_SteamUserStats_FindLeaderboard(this._stats, this._leaderboardName, Marshal.GetFunctionPointerForDelegate((Delegate) this._internalOnLeaderboardRetrieved))) return; this._onLeaderboardRetrieved(this); }