示例#1
0
    public void SetUserScoreShownOnLeaderboards(int active)
    {
        ITask <int> task = rankingsClient.SetRankingSwitchStatus(1);

        task.AddOnSuccessListener((result) =>
        {
            Debug.Log("[HMS GAMES] SetUserScoreShownOnLeaderboards SUCCESS" + result);
        }).AddOnFailureListener((exception) =>
        {
            Debug.Log("[HMS GAMES] SetUserScoreShownOnLeaderboards ERROR");
        });
    }
        public void SetUserScoreShownOnLeaderboards(int active)
        {
            ITask <int> task = rankingsClient.SetRankingSwitchStatus(active);

            task.AddOnSuccessListener((result) =>
            {
                Debug.Log("[HMSLeaderboardManager] SetUserScoreShownOnLeaderboards SUCCESS" + result);
                OnSetUserScoreShownOnLeaderboardsSuccess?.Invoke(result);
            }).AddOnFailureListener((exception) =>
            {
                Debug.LogError("[HMSLeaderboardManager]: SetUserScoreShownOnLeaderboards failed. CauseMessage: " + exception.WrappedCauseMessage + ", ExceptionMessage: " + exception.WrappedExceptionMessage);
                OnSetUserScoreShownOnLeaderboardsFailure?.Invoke(exception);
            });
        }