Ruyi SDK
Namespaces
Ruyi.SDK.Online
RuyiNetClient Class
RuyiNetClient Properties
RuyiNetClient Methods
Click or drag to resizeClick or drag to resize

RuyiNetClient Class

[This is preliminary documentation and is subject to change.]

The main client for accessing Ruyi's online services (aka "RuyiNet")
Inheritance Hierarchy
SystemObject
  Ruyi.SDK.OnlineRuyiNetClient

Namespace:  Ruyi.SDK.Online
Assembly:  RuyiSDK (in RuyiSDK.dll) Version: 0.9.3.3995 (0.9.3.3995)
Syntax
C#
Copy
public class RuyiNetClient : IDisposable

The RuyiNetClient type exposes the following members.

Properties
  NameDescription
Public propertyActivePlayer
Returns the first active player available.
Public propertyActivePlayerIndex
Returns the index of the first active player available.
Public propertyCloudService
Handles backing up data to the cloud.
Public propertyCurrentPlayers
The profile of the currently logged in player, if any.
Public propertyFriendService
Provides operations for managing Friend Lists.
Public propertyGamificationService
Public propertyInitialised
Whether or not RuyiNet has been initialised.
Public propertyIsWorking
Returns TRUE while there are tasks in the queue.
Public propertyLeaderboardService
Provides operations to retrieve leaderboard data and submit scores.
Public propertyLobbyService
Manages lobbies for network games.
Public propertyNewUser
Whether or not this player is a new user.
Public propertyPartyService
Allows players to gather together in a party.
Public propertyPatchService
Get manifest info for a game.
Public propertyProfileService
Allows users to upload files to their individual accounts
Public propertyRemoteIpAddress
The remote IP address that can be used to connect to this machine.
Public propertyTelemetryService
Handles pushing telemetry data to the cloud.
Public propertyUserFileService
Allows users to upload files to their individual accounts
Public propertyVideoService
Allows users to upload videos to their individual accounts.
Top
Methods
  NameDescription
Public methodDispose
Cleanup native resources before destruction.
Public methodInitialise
Initialise the RUYI net client and switch to the game context.
Public methodUpdate
Update the tasks.
Top
Remarks

Instance available from RuyiNetService property of RuyiSDK.

Must call Update periodically to process events and callbacks.

Examples
Copy
using (var ruyi = RuyiSDK.CreateInstance(new RuyiSDKContext { endpoint = RuyiSDKContext.Endpoint.Console }))
{
    ruyi.RuyiNetService.Initialise(APP_ID, APP_SECRET, () =>
    {
        foreach (var player in ruyi.RuyiNetService.CurrentPlayers)
        {
            if (player == null)
                continue;
            Console.WriteLine(player.profileName);
        }
    });
    while (ruyi.RuyiNetService.IsWorking) { ruyi.Update(); }
}
See Also

Reference

Ruyi.SDK.Online Namespace

Copyright ©Zhongshan Subor Advanced Technology Co., Ltd. 2017-2018, All right reserved

Send comments on this topic to dev-support@playruyi.com