class staaxe.Staaxe
Available on all platforms
This is a purely static class. To be used, you have to call the init function. If you want to check when it's correctly initialized, check if id is not null.
Class Fields
static function init(options:InitOptions):Void
Init function, call it as soon as possible. take an InitOptions object in parameter : - url : the url of the Staaxe server - token : the token corresponding to the current game - interval : in second, how much time will separate each ping request.
static function send(key:String, value:String, ?now:Bool = false):Void
Send function : send a message to the server. A message has a key and a value (example : "end": "true" or "score": "457" or even "info": "Player found the sword"). The now parameter indicate if messages must be sent right now or if it can wait the next bulk-send (following the interval configuration).