DIFF

class BackendApiSource

Constructors 2

private void BackendApi()
private void ~BackendApi()

Methods 16

proto native bool Initiate()

Initiate backend - request processing

proto native bool Shutdown()

Shutdown backend - request processing

proto native bool IsDisconnected()

Backend offline - authentication may be initiated

proto native bool IsRuntime()

Backend fully working and initialized

proto native bool IsBusy()

Backend is busy - authentication in process

string GetErrorCode(int code)

Error code to string

void OnCannotInitiate(int code)

Called when initiate cannot be called

References GetErrorCode(), and Print()
void OnCannotShutdown(int code)

Called when shutdown cannot be proceeded

References GetErrorCode(), and Print()
void OnSuccess(string step)

Called when step was successfully proceeded

References Print()
void OnFail(string step)

Called when step failed

References Print()
proto native void Request(int request, BackendCallback cb, JsonApiStruct dataObject)

Ask specific request with callback result

request
Is type of request, which is EBackendRequest
cb
Is script callback where you will recieve result/ error or even data when request finsihes
data
Is optional callback when request uses or response return Json data and you want to work with object
proto native void PlayerRequest(int request, BackendCallback cb, JsonApiStruct dataObject, int iPlayerId)

Ask player request with callback result from controller (Lobby)

request
Is type of request, which is EBackendRequest
cb
Is script callback where you will recieve result/ error or even data when request finsihes
data
Is optional callback when request uses or response return Json data and you want to work with object
iPlayerId
Is Player Id used on player identity
proto native void FeedbackMessage(BackendCallback cb, JsonApiStruct dataObject, string message)

Send feedback message and/ or script object with whatever data on it (additionally it is possible to handle callback as well)

cb
Is script callback where you will recieve result/ error or even data when request finsihes
data
Is optional callback when request uses or response return Json data and you want to work with object
message
Is custom
proto native void SetCredentialsItem(EBackendCredentials item, string str)

Set credentials value per item

item
Is type of EBackendCredentials parameter you want to set
str
Is value itself
proto native string GetCredentialsItem(EBackendCredentials item)

Get credentials value per item

item
Is type of EBackendCredentials parameter you want to read
proto native void VerifyCredentials()

Invoke credentials update (authenticate with new name+password)