当前位置: 首页>>代码示例>>C#>>正文


C# Internal.ServerCall类代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: StartMatch

        /// <summary>
        /// Starts a match
        /// </summary>
        /// <remarks>
        /// Service Name - OneWayMatch
        /// Service Operation - StartMatch
        /// </remarks>
        /// <param name="in_otherPlayerId"> The player to start a match with </param>
        /// <param name="in_rangeDelta"> The range delta used for the initial match search </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": {
        ///        "playbackStreamId": "d18719db-9d02-2341-b62f-8e2f013369be",
        ///        "initiatingPlayerId": "d175f6ac-9221-4adc-aea4-f25f2426ff62",
        ///        "targetPlayerId": "07a0d23e-996b-4488-90ae-cb438342423a54",
        ///        "status": "STARTED",
        ///        "summary": {},
        ///        "initialSharedData": {
        ///            "entities": [],
        ///            "statistics": {}
        ///        },
        ///        "events": [],
        ///        "createdAt": 1437419496282,
        ///        "updatedAt": 1437419496282
        ///    }
        /// }
        /// </returns>
        public void StartMatch(
            string in_otherPlayerId,
            long in_rangeDelta,
            SuccessCallback in_success = null,
            FailureCallback in_failure = null,
            object in_cbObject = null)
        {
            Dictionary<string, object> data = new Dictionary<string, object>();
            data[OperationParam.OfflineMatchServicePlayerId.Value] = in_otherPlayerId;
            data[OperationParam.OfflineMatchServiceRangeDelta.Value] = in_rangeDelta;

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

示例9: GetFriendProfileInfo

        /// <summary>
        /// Retrieves profile information for the specified user.
        /// </summary>
        /// <remarks>
        /// Service Name - Friend
        /// Service Operation - GetFriendProfileInfo
        /// </remarks>
        /// <param name="in_friendId">
        /// Profile Id of friend who owns entity.
        /// </param>
        /// <param name="in_authenticationType">
        /// The authentication type used for this friend id e.g. Facebook
        /// </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
        /// {
        ///   "status":200,
        ///   "data": {
        ///     "playerId" : "17c7ee96-1b73-43d0-8817-cba1953bbf57",
        ///     "playerName" : "Donald Trump",
        ///     "email" : "[email protected]",
        ///     "playerSummaryData" : {},
        ///   }
        /// }
        /// </returns>
        public void GetFriendProfileInfo(
            string in_friendId,
            string in_authenticationType,
            SuccessCallback in_success = null,
            FailureCallback in_failure = null,
            object in_cbObject = null)
        {
            Dictionary<string, object> data = new Dictionary<string, object>();
            data[OperationParam.FriendServiceFriendId.Value] = in_friendId;
            data[OperationParam.FriendServiceAuthenticationType.Value] = in_authenticationType;

            ServerCallback callback = BrainCloudClient.CreateServerCallback(in_success, in_failure, in_cbObject);
            ServerCall sc = new ServerCall(ServiceName.Friend, ServiceOperation.GetFriendProfileInfo, data, callback);
            m_brainCloudClientRef.SendRequest(sc);
        }
开发者ID:christyharagan,项目名称:ml-demojam-gamelogic,代码行数:48,代码来源:BrainCloudFriend.cs

示例10: ReadFriendEntity

        /// <summary>
        /// Returns a particular entity of a particular friend.
        /// </summary>
        /// <remarks>
        /// Service Name - Friend
        /// Service Operation - ReadFriendEntity
        /// </remarks>
        /// <param name="in_entityId">
        /// Id of entity to retrieve.
        /// </param>
        /// <param name="in_friendId">
        /// Profile Id of friend who owns entity.
        /// </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
        /// </returns>
        public void ReadFriendEntity(
            string in_entityId,
            string in_friendId,
            SuccessCallback in_success = null,
            FailureCallback in_failure = null,
            object in_cbObject = null)
        {
            Dictionary<string, object> data = new Dictionary<string, object>();
            data[OperationParam.FriendServiceEntityId.Value] = in_entityId;
            data[OperationParam.FriendServiceFriendId.Value] = in_friendId;

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

示例11: DeleteIncomingEvent

        /// <summary>
        /// Delete an event out of the player's incoming mailbox.
        /// </summary>
        /// <remarks>
        /// Service Name - Event
        /// Service Operation - DeleteIncoming
        /// </remarks>
        /// <param name="in_fromPlayerId">
        /// The id of the player who sent the event
        /// </param>
        /// <param name="in_eventId">
        /// The event id
        /// </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 DeleteIncomingEvent(
            string in_fromPlayerId,
            ulong in_eventId,
            SuccessCallback in_success = null,
            FailureCallback in_failure = null,
            object in_cbObject = null)
        {
            Dictionary<string, object> data = new Dictionary<string, object>();
            data[OperationParam.EventServiceDeleteIncomingFromId.Value] = in_fromPlayerId;
            data[OperationParam.EventServiceDeleteIncomingEventId.Value] = in_eventId;

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

示例12: AbandonMatch

        /// <summary>
        /// Marks the given match as abandoned.
        /// </summary>
        /// <remarks>
        /// Service Name - AsyncMatch
        /// Service Operation - Abandon
        /// </remarks>
        /// <param name="ownerId">
        /// Match owner identifier
        /// </param>
        /// <param name="matchId">
        /// Match identifier
        /// </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>
        /// {
        ///     "status": 200,
        ///     "data": {}
        /// }
        /// </returns>
        public void AbandonMatch(
            string in_ownerId,
            string in_matchId,
            SuccessCallback in_success = null,
            FailureCallback in_failure = null,
            object in_cbObject = null)
        {
            Dictionary<string, object> data = new Dictionary<string, object>();

            data["ownerId"] = in_ownerId;
            data["matchId"] = in_matchId;

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

示例13: RunScript

        /// <summary>
        /// Executes a script on the server.
        /// </summary>
        /// <remarks>
        /// Service Name - Script
        /// Service Operation - Run
        /// </remarks>
        /// <param name="in_scriptName">
        /// The name of the script to be run
        /// </param>
        /// <param name="in_jsonScriptData">
        /// Data to be sent to the script in json format
        /// </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 //// this value depends on what the script returns
        /// }
        /// @see The API documentation site for more details on cloud code
        /// </returns>
        public void RunScript(
            string in_scriptName,
            string in_jsonScriptData,
            SuccessCallback in_success = null,
            FailureCallback in_failure = null,
            object in_cbObject = null)
        {
            Dictionary<string, object> data = new Dictionary<string, object>();
            data[OperationParam.ScriptServiceRunScriptName.Value] = in_scriptName;

            if (Util.IsOptionalParameterValid(in_jsonScriptData))
            {
                Dictionary<string, object> scriptData = JsonReader.Deserialize<Dictionary<string, object>>(in_jsonScriptData);
                data[OperationParam.ScriptServiceRunScriptData.Value] = scriptData;
            }

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

示例14: GetUpdatedFiles

        /// <summary>
        /// Sends an array of file details and returns 
        /// the details of any of those files that have changed
        /// </summary>
        /// <remarks>
        /// Service Name - S3Handling
        /// Service Operation - GetUpdatedFiles
        /// </remarks>
        /// <param name="in_category">  
        /// Category of files on server to compare against
        /// </param>
        /// <param name="in_fileDetailsJson">  
        /// An array of file details
        /// </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,
        ///     "fileDetails": [
        ///         {
        ///             "gameId": "12311331",
        ///             "fileId": "3780516b-14f8-4055-8899-8eaab6ac7e82",
        ///             "shortName": "Test Doc",
        ///             "fileName": "testDoc.txt",
        ///             "type": "g",
        ///             "subType": "cust",
        ///             "category": null,
        ///             "fileSize": 4,
        ///             "dateUploaded": 1437154770000,
        ///             "relativeUrl": "/cust/testDoc.txt",
        ///             "absoluteUrl": "http://internal.braincloudservers.com/s3/portal/g/12311331/cust/testDoc.txt",
        ///             "md5Hash": "d41d8cd98f00b204e9800998ecf8427e"
        ///         }
        ///     ]
        /// }
        /// </returns>
        public void GetUpdatedFiles(
            string in_category,
            string in_fileDetailsJson,
            SuccessCallback in_success = null,
            FailureCallback in_failure = null,
            object in_cbObject = null)
        {
            Dictionary<string, object> data = new Dictionary<string, object>();

            if (Util.IsOptionalParameterValid(in_category))
            {
                data[OperationParam.S3HandlingServiceFileCategory.Value] = in_category;
            }

            data[OperationParam.S3HandlingServiceFileDetails.Value] = JsonReader.Deserialize<object[]>(in_fileDetailsJson);

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

示例15: Tweet

        public void Tweet(
            string in_token,
            string in_secret,
            string in_tweet,
            string in_picture,
            SuccessCallback in_success = null,
            FailureCallback in_failure = null,
            object in_cbObject = null)
        {
            Dictionary<string, object> data = new Dictionary<string, object>();
            data[OperationParam.TwitterServiceTweetToken.Value] = in_token;
            data[OperationParam.TwitterServiceTweetSecret.Value] = in_secret;
            data[OperationParam.TwitterServiceTweetTweet.Value] = in_tweet;

            if (Util.IsOptionalParameterValid(in_picture))
            {
                data[OperationParam.TwitterServiceTweetPic.Value] = in_picture;
            }

            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:RosimInc,项目名称:OJam2015,代码行数:23,代码来源:BrainCloudTwitter.cs


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