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
ReferenceArcaletScene 》 Constructor

Constructor

ArcaletScene(ArcaletGame game,string sguid)
game 	This is the ArcaletGame object which has been established and has connected successfully.
sguid 	The SGUID of the scene.
		
If the sguid indicates a static scene, then the Launch() method will be called and the user will enter the scene.

If sguid indicates a dynamic scene, there are three approaches:

1. Call Launch() to create a new copy of the scene and enter the scene.

2. Call Match() and the object is paired up with the established copy of a scene by the arcalet server. The priority is based on which scene copy is established first. It will not go to the next scene until the number of players reach the maximum the developer sets. 

Please note: if the number of players is unlimited, the arcalet server will automatically use the FairMatch() pairing method.

3. Call FairMatch() and this method sequentially matches one player after the other to the established copy of the scene. Using this method allows each player to be paired up with the copy of the scene fairly.

When players attempt to enter the scene, successfully or not, this will trigger an OnCompletion() event. If the player successfully enters the scene, the code in OnCompletion() will be 0, whereas the code will not be 0 if the player unsuccessfully entered the scene.If no player is currently awaiting for pairing, a failure code 22 will be sent. One must re-establish an ArcaletScene by using Launch() to create a new instance of the scene to wait for another player to be paired.
ArcaletScene(ArcaletGame game,string sguid,int sid)
game 	This is the ArcaletGame object which has been established and has connected successfully.
sguid	The SGUID of the scene.
sid 		The SID of the scene

This constructor is used in the dynamic scenes, used if you know there is already a copy of the scene.Create a scene with this constructor, and then call Launch() to enter the copy of the scene.
ArcaletScene(ArcaletGame game,string sguid,bool isLocked)
game 	        This is the ArcaletGame object which has been established and has connected successfully.
sguid 	        The SGUID of the scene.
isLocked 	determines if this copy of the scene accepts the arcalet server pair up automatically.

This constructor is used to build a dynamic scene copy, but then can only be used by calling Launch(). When the parameter isLocked is true, that means that the scene copy accepts the arcalet server's pair up automatically. When it is false, then it functions in the same way as the other constructors.
Was this page helpful?
Yes No