• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# FailureCallback类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中FailureCallback的典型用法代码示例。如果您正苦于以下问题:C# FailureCallback类的具体用法?C# FailureCallback怎么用?C# FailureCallback使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FailureCallback类属于命名空间,在下文中一共展示了FailureCallback类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: AddEvent

        /// <summary>
        /// Adds a stream event
        /// </summary>
        /// <remarks>
        /// Service Name - PlaybackStream
        /// Service Operation - AddEvent
        /// </remarks>
        /// <param name="in_playbackStreamId">
        /// Identifies the stream to read
        /// </param>
        /// <param name="in_eventData">
        /// Describes the event
        /// </param>
        /// <param name="in_summary">
        /// Current summary data as of this event
        /// </param>
        /// <param name="in_success">
        /// The success callback.
        /// </param>
        /// <param name="in_failure">
        /// The failure callback.
        /// </param>
        /// <param name="in_cbObject">
        /// The user object sent to the callback.
        /// </param>
        /// <returns> The JSON returned in the callback is as follows:
        /// {
        ///    "status": 200,
        ///    "data": null
        /// }
        /// </returns>
        public void AddEvent(
            string in_playbackStreamId,
            string in_eventData,
            string in_summary,
            SuccessCallback in_success = null,
            FailureCallback in_failure = null,
            object in_cbObject = null)
        {
            Dictionary<string, object> data = new Dictionary<string, object>();
            data[OperationParam.PlaybackStreamServicePlaybackStreamId.Value] = in_playbackStreamId;

            if (Util.IsOptionalParameterValid(in_eventData))
            {
                Dictionary<string, object> jsonEventData = JsonReader.Deserialize<Dictionary<string, object>> (in_eventData);
                data[OperationParam.PlaybackStreamServiceEventData.Value] = jsonEventData;
            }

            if (Util.IsOptionalParameterValid(in_summary))
            {
                Dictionary<string, object> jsonSummary = JsonReader.Deserialize<Dictionary<string, object>> (in_summary);
                data[OperationParam.PlaybackStreamServiceSummary.Value] = jsonSummary;
            }

            ServerCallback callback = BrainCloudClient.CreateServerCallback(in_success, in_failure, in_cbObject);
            ServerCall sc = new ServerCall(ServiceName.PlaybackStream, ServiceOperation.AddEvent, data, callback);
            m_brainCloudClientRef.SendRequest(sc);
        }
开发者ID:RosimInc,项目名称:OJam2015,代码行数:58,代码来源:BrainCloudPlaybackStream.cs


示例2: AwardAchievements

        /// <summary>
        /// Method will award the achievements specified. On success, this will
        /// call AwardThirdPartyAchievement to hook into the client-side Achievement
        /// service (ie GameCentre, Facebook etc).
        /// </summary>
        /// <remarks>
        /// Service Name - Gamification
        /// Service Operation - AwardAchievements
        /// </remarks>
        /// <param name="in_achievementIds">
        /// A comma separated list of achievement ids to award
        /// </param>
        /// <param name="in_success">
        /// The success callback.
        /// </param>
        /// <param name="in_failure">
        /// The failure callback.
        /// </param>
        /// <param name="in_cbObject">
        /// The user object sent to the callback.
        /// </param>
        /// <returns> The JSON returned in the callback is as follows:
        /// {
        ///   "status":200,
        ///   "data":null
        /// }
        /// </returns>
        public void AwardAchievements(
            string in_achievementIds,
            SuccessCallback in_success = null,
            FailureCallback in_failure = null,
            object in_cbObject = null)
        {
            string[] ids = in_achievementIds.Split(new char[] { ',' });
            string achievementsStr = "[";
            for (int i = 0, isize = ids.Length; i < isize; ++i)
            {
                achievementsStr += (i == 0 ? "\"" : ",\"");
                achievementsStr += ids[i];
                achievementsStr += "\"";
            }
            achievementsStr += "]";

            string[] achievementData = JsonReader.Deserialize<string[]>(achievementsStr);

            Dictionary<string, object> data = new Dictionary<string, object>();
            data[OperationParam.GamificationServiceAchievementsName.Value] = achievementData;

            SuccessCallback successCallbacks = (SuccessCallback)AchievementAwardedSuccessCallback;
            if (in_success != null)
            {
                successCallbacks += in_success;
            }
            ServerCallback callback = BrainCloudClient.CreateServerCallback(successCallbacks, in_failure);
            ServerCall sc = new ServerCall(ServiceName.Gamification, ServiceOperation.AwardAchievements, data, callback);
            m_brainCloudClientRef.SendRequest(sc);
        }
开发者ID:PointlessReboot,项目名称:Unity-Csharp,代码行数:57,代码来源:BrainCloudGamification.cs


示例3: RegisterPushNotificationDeviceToken

        /// <summary>
        /// Registers the given device token with the server to enable this device
        /// to receive push notifications.
        /// </param>
        /// <param name="in_token">
        /// The platform-dependant device token needed for push notifications.
        /// </param>
        /// <param name="in_success">
        /// The success callback
        /// </param>
        /// <param name="in_failure">
        /// The failure callback
        /// </param>
        /// <param name="in_cbObject">
        /// The callback object
        /// </param>
        /// <returns> JSON describing the new value of the statistics and any rewards that were triggered:
        /// {
        ///   "status":200,
        ///   "data":null
        /// }
        /// </returns>
        public bool RegisterPushNotificationDeviceToken(
            byte[] in_token,
            SuccessCallback in_success = null,
            FailureCallback in_failure = null,
            object in_cbObject = null)
        {
            if (in_token != null || in_token.Length < 1)
            {
                byte[] token = in_token;

                Platform platform = Platform.FromUnityRuntime();
                string hexToken = System.BitConverter.ToString(token).Replace("-","").ToLower();
                RegisterPushNotificationDeviceToken(platform,
                        hexToken,
                        in_success,
                        in_failure,
                        in_cbObject);
                return true;
            }
            // there was an error
            else
            {
                return false;
            }
        }
开发者ID:PointlessReboot,项目名称:Unity-Csharp,代码行数:47,代码来源:BrainCloudPushNotification.cs


示例4: RegisterPushNotificationDeviceToken

        /// <summary>
        /// Registers the given device token with the server to enable this device
        /// to receive push notifications.
        /// </param>
        /// <param name="in_token">
        /// The platform-dependant device token needed for push notifications.
        /// </param>
        /// <param name="in_success">
        /// The success callback
        /// </param>
        /// <param name="in_failure">
        /// The failure callback
        /// </param>
        /// <param name="in_cbObject">
        /// The callback object
        /// </param>
        /// <returns> JSON describing the new value of the statistics and any rewards that were triggered:
        /// {
        ///   "status":200,
        ///   "data":null
        /// }
        /// </returns>
        public bool RegisterPushNotificationDeviceToken(
            byte[] in_token,
            SuccessCallback in_success = null,
            FailureCallback in_failure = null,
            object in_cbObject = null)
        {
            if (in_token != null || in_token.Length < 1)
            {
                byte[] token = in_token;

                // send token to a provider
                // default to iOS
                // TODO: implement other device types
                string deviceType = OperationParam.DeviceRegistrationTypeIos.Value;
                if (UnityEngine.Application.platform == UnityEngine.RuntimePlatform.Android)
                {
                    deviceType = OperationParam.DeviceRegistrationTypeAndroid.Value;
                }

                string hexToken = System.BitConverter.ToString(token).Replace("-","").ToLower();
                return RegisterPushNotificationDeviceToken(deviceType,
                        hexToken,
                        in_success,
                        in_failure,
                        in_cbObject);
            }
            // there was an error
            else
            {
                return false;
            }
        }
开发者ID:RosimInc,项目名称:OJam2015,代码行数:54,代码来源:BrainCloudPushNotification.cs


示例5: SendEvent

        /// <summary>
        /// Sends an event to the designated player id with the attached json data.
        /// Any events that have been sent to a player will show up in their
        /// incoming event mailbox. If the in_recordLocally flag is set to true,
        /// a copy of this event (with the exact same event id) will be stored
        /// in the sending player's "sent" event mailbox.
        ///
        /// Note that the list of sent and incoming events for a player is returned
        /// in the "ReadPlayerState" call (in the BrainCloudPlayer module).
        /// </summary>
        /// <remarks>
        /// Service Name - Event
        /// Service Operation - Send
        /// </remarks>
        /// <param name="in_toPlayerId">
        /// The id of the player who is being sent the event
        /// </param>
        /// <param name="in_eventType">
        /// The user-defined type of the event.
        /// </param>
        /// <param name="in_jsonEventData">
        /// The user-defined data for this event encoded in JSON.
        /// </param>
        /// <param name="in_recordLocally">
        /// If true, a copy of this event will be saved in the
        /// user's sent events mailbox.
        /// </param>
        /// <param name="in_success">
        /// The success callback.
        /// </param>
        /// <param name="in_failure">
        /// The failure callback.
        /// </param>
        /// <param name="in_cbObject">
        /// The user object sent to the callback.
        /// </param>
        /// <returns> The JSON returned in the callback includes the server generated
        /// event id and is as follows:
        /// {
        ///   "status":200,
        ///   "data":{
        ///     "eventId":3824
        ///   }
        /// }
        /// </returns>
        public void SendEvent(
            string in_toPlayerId,
            string in_eventType,
            string in_jsonEventData,
            bool in_recordLocally,
            SuccessCallback in_success = null,
            FailureCallback in_failure = null,
            object in_cbObject = null)
        {
            Dictionary<string, object> data = new Dictionary<string, object>();

            data[OperationParam.EventServiceSendToId.Value] = in_toPlayerId;
            data[OperationParam.EventServiceSendEventType.Value] = in_eventType;

            if (Util.IsOptionalParameterValid(in_jsonEventData))
            {
                Dictionary<string, object> eventData = JsonReader.Deserialize<Dictionary<string, object>> (in_jsonEventData);
                data[OperationParam.EventServiceSendEventData.Value] = eventData;
            }

            data[OperationParam.EventServiceSendRecordLocally.Value] = in_recordLocally;

            ServerCallback callback = BrainCloudClient.CreateServerCallback(in_success, in_failure, in_cbObject);
            ServerCall sc = new ServerCall(ServiceName.Event, ServiceOperation.Send, data, callback);
            m_brainCloudClientRef.SendRequest(sc);
        }
开发者ID:Vince-Bitheads,项目名称:UnityExamples,代码行数:71,代码来源:BrainCloudEvent.cs


示例6: MergeFacebookIdentity

 /// <summary>
 /// Merge the profile associated with the provided Facebook credentials with the
 /// current profile.
 /// </summary>
 /// <remarks>
 /// Service Name - Identity
 /// Service Operation - Merge
 /// </remarks>
 /// <param name="externalId">
 /// The facebook id of the user
 /// </param>
 /// <param name="authenticationToken">
 /// The validated token from the Facebook SDK
 /// (that will be further validated when sent to the bC service)
 /// </param>
 /// <param name="in_success">
 /// The method to call in event of successful login
 /// </param>
 /// <param name="in_failure">
 /// The method to call in the event of an error during authentication
 /// </param>
 public void MergeFacebookIdentity(
     string in_externalId,
     string in_authenticationToken,
     SuccessCallback in_success,
     FailureCallback in_failure)
 {
     this.MergeIdentity(in_externalId, in_authenticationToken, OperationParam.AuthenticateServiceAuthenticateAuthFacebook.Value, in_success, in_failure);
 }
开发者ID:Vince-Bitheads,项目名称:UnityExamples,代码行数:29,代码来源:BrainCloudIdentity.cs


示例7: RegisterCard

        public void RegisterCard(PaymentViewModel payment, SuccessCallback success, FailureCallback failure, UINavigationController navigationController)
        {
            var view = _viewLocator.GetRegisterCardView();
            view.successCallback = success;
            view.failureCallback = failure;
            view.registerCardModel = payment;
			PresentView (navigationController, view);
        }
开发者ID:TheJaniceTong,项目名称:Judo-Xamarin,代码行数:8,代码来源:UIMethods.cs


示例8: TokenPreAuth

        public void TokenPreAuth(TokenPaymentViewModel payment, SuccessCallback success, FailureCallback failure, UINavigationController navigationController)
        {
            var view = _viewLocator.GetTokenPreAuthView();
            view.successCallback = success;
            view.failureCallback = failure;
            view.tokenPayment = payment;
			PresentView (navigationController, view);
        }
开发者ID:TheJaniceTong,项目名称:Judo-Xamarin,代码行数:8,代码来源:UIMethods.cs


示例9: AttachEmailIdentity

 /// <summary>
 /// Attach a Email and Password identity to the current profile.
 /// </summary>
 /// <remarks>
 /// Service Name - Identity
 /// Service Operation - Attach
 /// </remarks>
 /// <param name="in_email">
 /// The player's e-mail address
 /// </param>
 /// <param name="in_password">
 /// The player's password
 /// </param>
 /// <param name="in_success">
 /// The method to call in event of successful login
 /// </param>
 /// <param name="in_failure">
 /// The method to call in the event of an error during authentication
 /// </param>
 /// <returns>
 /// Errors to watch for:  SWITCHING_PROFILES - this means that the email address you provided
 /// already points to a different profile.  You will likely want to offer the player the
 /// choice to *SWITCH* to that profile, or *MERGE* the profiles.
 ///
 /// To switch profiles, call ClearSavedProfileID() and then call AuthenticateEmailPassword().
 /// </returns>
 public void AttachEmailIdentity(
     string in_email,
     string in_password,
     SuccessCallback in_success,
     FailureCallback in_failure)
 {
     this.AttachIdentity(in_email, in_password, OperationParam.AuthenticateServiceAuthenticateAuthEmail.Value, in_success, in_failure);
 }
开发者ID:PointlessReboot,项目名称:Unity-Csharp,代码行数:34,代码来源:BrainCloudIdentity.cs


示例10: ReadAllGlobalStats

 /// <summary>
 /// Method returns all of the global statistics.
 /// </summary>
 /// <remarks>
 /// Service Name - GlobalStatistics
 /// Service Operation - Read
 /// </remarks>
 /// <param name="in_success">
 /// The success callback
 /// </param>
 /// <param name="in_failure">
 /// The failure callback
 /// </param>
 /// <param name="in_cbObject">
 /// The callback object
 /// </param>
 /// <returns> JSON describing the global statistics:
 /// {
 ///   "status":200,
 ///   "data":{
 ///     "statisticsExceptions":{
 ///     },
 ///     "statistics":{
 ///       "Level02_TimesBeaten":11,
 ///       "Level01_TimesBeaten":1,
 ///       "GameLogins":376,
 ///       "PlayersWhoLikePirateClothing":12
 ///     }
 ///   }
 /// }
 /// </returns>
 public void ReadAllGlobalStats(
     SuccessCallback in_success,
     FailureCallback in_failure,
     object in_cbObject = null)
 {
     ServerCallback callback = BrainCloudClient.CreateServerCallback(in_success, in_failure, in_cbObject);
     ServerCall sc = new ServerCall(ServiceName.GlobalStatistics, ServiceOperation.Read, null, callback);
     m_brainCloudClientRef.SendRequest(sc);
 }
开发者ID:Vince-Bitheads,项目名称:UnityExamples,代码行数:40,代码来源:BrainCloudGlobalStatistics.cs


示例11: AuthorizeTwitter

 public void AuthorizeTwitter(
     SuccessCallback in_success = null,
     FailureCallback in_failure = null,
     object in_cbObject = null)
 {
     ServerCallback callback = BrainCloudClient.CreateServerCallback(in_success, in_failure, in_cbObject);
     ServerCall sc = new ServerCall(ServiceName.Event, ServiceOperation.Send, null, callback);
     m_brainCloudClientRef.SendRequest(sc);
 }
开发者ID:RosimInc,项目名称:OJam2015,代码行数:9,代码来源:BrainCloudTwitter.cs


示例12: DeletePlayer

 /// <summary>
 /// Completely deletes the player record and all data fully owned
 /// by the player. After calling this method, the player will need
 /// to re-authenticate and create a new profile.
 /// This is mostly used for debugging/qa.
 /// </summary>
 /// <remarks>
 /// Service Name - PlayerState
 /// Service Operation - FullReset
 /// </remarks>
 /// <param name="in_success">
 /// The success callback.
 /// </param>
 /// <param name="in_failure">
 /// The failure callback.
 /// </param>
 /// <param name="in_cbObject">
 /// The user object sent to the callback.
 /// </param>
 /// <returns> The JSON returned in the callback is as follows:
 /// {
 ///   "status":200,
 ///   "data":null
 /// }
 /// </returns>
 public void DeletePlayer(
     SuccessCallback in_success = null,
     FailureCallback in_failure = null,
     object in_cbObject = null)
 {
     ServerCallback callback = BrainCloudClient.CreateServerCallback(in_success, in_failure, in_cbObject);
     ServerCall sc = new ServerCall(ServiceName.PlayerState, ServiceOperation.FullReset, null, callback);
     m_brainCloudClientRef.SendRequest(sc);
 }
开发者ID:PointlessReboot,项目名称:Unity-Csharp,代码行数:34,代码来源:BrainCloudPlayerState.cs


示例13: ReadProperties

 /// <summary>
 /// Method reads all the global properties of the game
 /// </summary>
 /// <remarks>
 /// Service Name - GlobalApp
 /// Service Operation - ReadProperties
 /// </remarks>
 /// <param name="in_success">
 /// The success callback.
 /// </param>
 /// <param name="in_failure">
 /// The failure callback.
 /// </param>
 /// <param name="in_cbObject">
 /// The user object sent to the callback.
 /// </param>
 /// <returns> JSON describing the global properties:
 /// {
 ///   "status":200,
 ///   "data": {
 ///     "pName": {
 ///       "name": "pName",
 ///	      "description": "pValue",
 ///	      "value": "pDescription"
 ///	    }
 ///   }
 /// }
 /// </returns>
 public void ReadProperties(
     SuccessCallback in_success = null,
     FailureCallback in_failure = null,
     object in_cbObject = null)
 {
     ServerCallback callback = BrainCloudClient.CreateServerCallback(in_success, in_failure, in_cbObject);
     ServerCall serverCall = new ServerCall(ServiceName.GlobalApp, ServiceOperation.ReadProperties, null, callback);
     m_brainCloudClientRef.SendRequest(serverCall);
 }
开发者ID:Vince-Bitheads,项目名称:UnityExamples,代码行数:37,代码来源:BrainCloudGlobalApp.cs


示例14: GetNextExperienceLevel

 /// <summary>
 /// Returns JSON representing the next experience level for the player.
 /// </summary>
 /// <remarks>
 /// Service Name - PlayerStatistics
 /// Service Operation - ReadNextXpLevel
 /// </remarks>
 /// <param name="in_success">
 /// The success callback
 /// </param>
 /// <param name="in_failure">
 /// The failure callback
 /// </param>
 /// <param name="in_cbObject">
 /// The callback object
 /// </param>
 /// <returns> JSON describing the next experience level for the player.
 /// {
 ///   "status":200,
 ///   "data":{
 ///     "xp_level":{
 ///       "gameId":"com.bitheads.unityexample",
 ///       "numericLevel":2,
 ///       "experience":20,
 ///       "reward":{
 ///         "globalGameStatistics":null,
 ///         "experiencePoints":null,
 ///         "playerStatistics":null,
 ///         "achievement":null,
 ///         "currencies":{
 ///           "gems":10,
 ///           "gold":2000
 ///         }
 ///       },
 ///       "facebookAction":"",
 ///       "statusTitle":"Jester",
 ///       "key":{
 ///         "gameId":"com.bitheads.unityexample",
 ///         "numericLevel":2,
 ///         "primaryKey":true
 ///       }
 ///     }
 ///   }
 /// }
 /// </returns>
 public void GetNextExperienceLevel(
     SuccessCallback in_success = null,
     FailureCallback in_failure = null,
     object in_cbObject = null)
 {
     ServerCallback callback = BrainCloudClient.CreateServerCallback(in_success, in_failure, in_cbObject);
     ServerCall sc = new ServerCall(ServiceName.PlayerStatistics, ServiceOperation.ReadNextXpLevel, null, callback);
     m_brainCloudClientRef.SendRequest(sc);
 }
开发者ID:PointlessReboot,项目名称:Unity-Csharp,代码行数:54,代码来源:BrainCloudPlayerStatistics.cs


示例15: HandleFailure

		private void HandleFailure (FailureCallback failure,Exception ex)
		{
			if (failure != null) {
				var judoError = new JudoError {
					Exception = ex
				};
				failure (judoError);
			}
		}
开发者ID:TheJaniceTong,项目名称:Judo-Xamarin,代码行数:9,代码来源:NonUIMethods.cs


示例16: PreAuth

        public void PreAuth(PaymentViewModel preAuthorisation, SuccessCallback success, FailureCallback failure, UINavigationController navigationController)
        {
            var view = _viewLocator.GetPreAuthView();

            // register card and pre Auth sharing same view so we need to set this property to false
            view.successCallback = success;
            view.failureCallback = failure;
            view.authorisationModel = preAuthorisation;
			PresentView (navigationController, view);
        }
开发者ID:TheJaniceTong,项目名称:Judo-Xamarin,代码行数:10,代码来源:UIMethods.cs


示例17: TokenPreAuth

        public void TokenPreAuth(TokenPaymentViewModel payment, SuccessCallback success, FailureCallback failure, UINavigationController navigationController)
        {
            try
            {
                _paymentService.MakeTokenPreAuthorisation(payment).ContinueWith(reponse => HandResponse(success, failure, reponse));
            }
            catch (Exception ex)
            {
                // Failure
				HandleFailure (failure,ex);
            }
        }
开发者ID:TheJaniceTong,项目名称:Judo-Xamarin,代码行数:12,代码来源:NonUIMethods.cs


示例18: CancelMatch

        /// <summary>
        /// Cancels a match
        /// </summary>
        /// <remarks>
        /// Service Name - OneWayMatch
        /// Service Operation - CancelMatch
        /// </remarks>
        /// <param name="in_playbackStreamId">
        /// The playback stream id returned in the start match
        /// </param>
        /// <param name="in_success">
        /// The success callback.
        /// </param>
        /// <param name="in_failure">
        /// The failure callback.
        /// </param>
        /// <param name="in_cbObject">
        /// The user object sent to the callback.
        /// </param>
        /// <returns> The JSON returned in the callback is as follows:
        /// {
        ///   "status": 200,
        ///   "data": null
        /// }
        /// </returns>
        public void CancelMatch(
            string in_playbackStreamId,
            SuccessCallback in_success = null,
            FailureCallback in_failure = null,
            object in_cbObject = null)
        {
            Dictionary<string, object> data = new Dictionary<string, object>();
            data[OperationParam.OfflineMatchServicePlaybackStreamId.Value] = in_playbackStreamId;

            ServerCallback callback = BrainCloudClient.CreateServerCallback(in_success, in_failure, in_cbObject);
            ServerCall sc = new ServerCall(ServiceName.OneWayMatch, ServiceOperation.CancelMatch, data, callback);
            m_brainCloudClientRef.SendRequest(sc);
        }
开发者ID:RosimInc,项目名称:OJam2015,代码行数:38,代码来源:BrainCloudOneWayMatch.cs


示例19: DecrementPlayerRating

        /// <summary>
        /// Decrements player rating
        /// </summary>
        /// <remarks>
        /// Service Name - MatchMaking
        /// Service Operation - DecrementPlayerRating
        /// </remarks>
        /// <param name="in_decrement">
        /// The decrement amount
        /// </param>
        /// <param name="in_success">
        /// The success callback.
        /// </param>
        /// <param name="in_failure">
        /// The failure callback.
        /// </param>
        /// <param name="in_cbObject">
        /// The user object sent to the callback.
        /// </param>
        /// <returns> The JSON returned in the callback is as follows:
        /// {
        ///   "status": 200,
        ///   "data": null
        /// }
        /// </returns>
        public void DecrementPlayerRating(
            long in_decrement,
            SuccessCallback in_success = null,
            FailureCallback in_failure = null,
            object in_cbObject = null)
        {
            Dictionary<string, object> data = new Dictionary<string, object>();
            data[OperationParam.MatchMakingServicePlayerRating.Value] = in_decrement;

            ServerCallback callback = BrainCloudClient.CreateServerCallback(in_success, in_failure, in_cbObject);
            ServerCall sc = new ServerCall(ServiceName.MatchMaking, ServiceOperation.DecrementPlayerRating, data, callback);
            m_brainCloudClientRef.SendRequest(sc);
        }
开发者ID:PointlessReboot,项目名称:Unity-Csharp,代码行数:38,代码来源:BrainCloudMatchMaking.cs


示例20: GetCurrency

        /// <summary>
        /// Gets the player's currency for the given currency type
        /// or all currency types if null passed in.
        /// </summary>
        /// <remarks>
        /// Service Name - Product
        /// Service Operation - GetPlayerVC
        /// </remarks>
        /// <param name="in_currencyType">
        /// The currency type to retrieve or null
        /// if all currency types are being requested.
        /// </param>
        /// <param name="in_success">
        /// The success callback.
        /// </param>
        /// <param name="in_failure">
        /// The failure callback.
        /// </param>
        /// <param name="in_cbObject">
        /// The user object sent to the callback.
        /// </param>
        /// <returns> The JSON returned in the callback is as follows:
        /// {
        ///   "status":200,
        ///   "data": {
        ///     "updatedAt": 1395693676208,
        ///     "currencyMap": {
        ///       "gold": {
        ///         "purchased": 0,
        ///         "balance": 0,
        ///         "consumed": 0,
        ///         "awarded": 0
        ///       }
        ///     },
        ///     "playerId": "6ea79853-4025-4159-8014-60a6f17ac4e6",
        ///     "createdAt": 1395693676208
        ///   }
        /// }
        /// </returns>
        public void GetCurrency(
            string in_currencyType,
            SuccessCallback in_success = null,
            FailureCallback in_failure = null,
            object in_cbObject = null)
        {
            Dictionary<string, object> data = new Dictionary<string, object>();
            data[OperationParam.ProductServiceGetPlayerVCId.Value] = in_currencyType;

            ServerCallback callback = BrainCloudClient.CreateServerCallback(in_success, in_failure, in_cbObject);
            ServerCall sc = new ServerCall(ServiceName.Product, ServiceOperation.GetPlayerVC, data, callback);
            m_brainCloudClientRef.SendRequest(sc);
        }
开发者ID:Vince-Bitheads,项目名称:UnityExamples,代码行数:52,代码来源:BrainCloudProduct.cs



注:本文中的FailureCallback类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# FailureStopCriterium类代码示例发布时间:2022-05-24
下一篇:
C# FadeState类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap