The controller works using the IAsylumDigitalObjectsClient interface. The interface is implemented in StandaloneClient and in ReactClient. When you run a build or playmode, the AsylumDigitalObjectsController script independently determines which approach to use.
Note: If You want to use WebGL build, you have also to add empty
ReactControllerin the scene and add
ReactClient.csas its component
OnItemWasLoaded- when all user items was parsed with metadata and initialized in the AsylumDigitalObjectsController
OnUserInfoRecieved- when all user info was parsed and initialized in the AsylumDigitalObjectsController
OnSpaceMetadataReceived- when all space info was parsed and initialized in the AsylumDigitalObjectsController
OnPauseRequestedAction- when pause requested out of game.
RequestAsylumUserItems- send user item request to chain. Subscribe to the event
OnItemWasLoadedto get the items
RequestAsylumUserInfo- send user info request to chain. Subscribe to the event
OnUserInfoRecievedto get the info
RequestAsylumSpaceMetadata- send space metadata request to chain. Subscribe to the event
OnSpaceMetadataRecievedto get the metadata
RequestMintAsylumItem- send minting item request to chain. Subscribe to the event
OnItemWasLoadedto get the minted item. The method has 2 parameters. The blueprint number and the item's metadata
ConnectToChain- connect to chain.
DisconnectFromChain- disconnect from chain.
OnExitRequested- send request to close space.
GetItemHandler- outputs a specific object, depending on the request, from the ItemHandlers array.
AccountSecretPhrase- to save secret phrase from the user's wallet.
ItemHandlers- a list of all downloaded items from the chain. An object of type AsylumItemAsyncHandler is a high-level object with fully loaded metadata.
UserInfo- contains complete information about the user downloaded from the chain.
SpaceMetadata- contains complete information about the space downloaded from the chain.