Document
Introduction
Summary
arcalet ?
Capabilities
Object Model
arcalet API
Synchronization
Event Processing
Callback
API Class
Objects Summary
Error Code
Reference
ArcaletGame
Constructor
Method
Property
Event
ArcaletScene
Constructor
Method
Property
Event
ArcaletItem
Method
Super User
ArcaletScore
Method
Super User
ArcaletShop
Method
ArcaletSystem
Method
ArcaletThreadPool
Method
ReferenceArcaletSystem 》 Method

Method

public static void ApplyNewUser(string gguid, byte[] gamecode,string userid,string passwd,string email,OnCallCompletion cb,object token)
gguid	        GGUID of the game
gamecode	The code of the game
userid	        For the application of the players account, please note that the account must be between 3-10 characters, 
                        alphanumeric characters only. The symbols can be "-", "."
passwd	        The code of the  password length is limited to 6-18 characters.
email	        Email account to verify the player.

The callback function of the completed API. It is defined as follows:

void cb(int code, object token)

code with a value of 0 means he account upgrade is successful. The account upgrade fails if the code is not 0).

The object corresponding to the dependent data.

This function allows the user to apply directly within the application to the player account, and the user does not have to be directed to the arcalet site for the account application.
public static void ApplyNewUser(string gguid,byte[] gamecode,OnCallCompletionWithData cb,object token)
gguid	        The game of GGUID
gamecode	The verification code of the game

cb	The callback function after API is completed and is defined as follows:
		
void cb(int code, object data, object token)

data must be modified as Hashtable, there are two Key, namely:

1. Userid account created by the system
2. Passwd account created by the system's login password (game password)

token 	Object that the callback function passes between data objects

This function allows the user within the application server requests directly to arcalet player account, username and password generated by the system after the return, the developer must use this game client account exists in the storage device (eg Sandbox), this account has called "system to get an account" or "Level 0 Account" within six months if the player does not play again this account, the account will be deleted.

"System to obtain account" can be upgraded to "official accounts of players through UpgradeUser().” The official account is customized by the player to set up with a password and e-mail, which is equivalent to using ApplyNewUser() officially to register another overloading account.
public static void UpgradeUser(ArcaletGame game, string userid,string passwd,string email,OnCallCompletion cb, object token)
game	    ArcaletGame object must be "System Get Account" login to call this method.
userid	    The application of the players account, please note that account must be between 3-10 characters long and can 
                    only be alphanumeric characters, symbols can be "-" and ".".
passwd	    Account password length limit 6-18 character.
email	    Account e-mail address is used to verify identity.

cb            Callback after completion of API functions. The function is defined as follows:

void cb(int code, object token)

code 0 means the setup succeeded. A code other than 0 means the setup failed.

token 	        Object that the callback function passes between data objects
public static bool SetSceneMaxThreads(int workerThreads)
workerThreads	Set the maximum processing thread in the thread pool in  the background processing program ArcaletScene

This function is to allow DP Developers to optimize its game's features.
Generally speaking, developers do not need much adjustment. Please note that the threads do not represent better performance. If the value is too high  and the TTL value (see SetSceneThreadTTL) is too low, it may cause a lot of threads generated and destroyed, which will reduce the stability of DP .
public static bool SetSceneMinThreads(int workerThreads)
workerThreads	Set the background processing program ArcaletScene, which uses the smallest thread count in thread pool

This function is to allow DP Developers to optimize their game's features. Generally speaking, developers do not need much adjustment.
public static bool SetSceneThreadTTL(int workerSeconds)
workerSeconds	The longest number of seconds of the processing threads to survive in the processing pool by the background 
                                 processing program. When the length of processing thread is idle more than the time, it will be removed 
                                 from the thread pool. Set the background processing program ArcaletScene .

This function is to allow DP Developers to optimize their game's features.
Generally speaking, developers do not need much adjustment. In addition, do not adjust the value too low, which will cause a huge amount of processing threads generated and destroyed and thus affect the stability of DP.
public static bool SetDatabaseMaxThreads(int workerThreads)
workerThreads	ArcaletItem、ArcaletScore、ArcaletShop、ArcaletSystem and the data base dealing with 
                                the maximum number of processing threads in the thread pool.

This function is to allow DP Developers to optimize its game's features.
Generally speaking, developers do not need much adjustment. Please note that using more processing threads does not mean better efficiency.

Adjusting the value too high will cause a huge amount of processing threads to be generated and destroyed and thus affect the stability of DP.
public static bool SetDatabaseMinThreads(int workerThreads)
workerThreads	ArcaletItem、ArcaletScore、ArcaletShop、ArcaletSystem and the data base dealing with the minimum number 
                                of processing threads in the thread pool 

This function is to allow DP Developers to optimize their game's features.
Generally speaking, developers do not need much adjustment.
public static bool SetDatabaseThreadTTL(int workerSeconds)
workerSeconds	ArcaletSystem and the data base dealing with the maximum number of processing threads in the thread pool . 
                                When the processing thread is in idle for more than the maximum number, it will be deleted from the processing 
                                thread pool.

This function is to allow DP Developers to optimize their game's features.
Generally speaking, developers do not need much adjustment.
Adjusting the value too low will cause a huge amount of processing threads to be generated and destroyed and thus affect the stability of DP.
public static string ServerTimeOfLastApiCall()
Some API functions, when communicating with the server, will get Arcalet system time. The time value can be set through this function, the format is yyyy / mm / dd hh: mm: ss, and the time zone is UTC standard time.
public static void UnityEnvironment()
In the Unity3D development environment, please call this function when the program starts. In reality, if this function is not called, in some platforms, such as Android phones, unexpected errors will appear. 

This function is only called once, but multiple calls will not cause negative results. However, the first time the function is called must be before ArcaletGame().
Was this page helpful?
Yes No