Constructor
Methods
inlineonceImmediate(handleImmediate:() ‑> Void):Void
Schedule immediate callback. These callbacks need to be flushed at some point by the backend
Parameters:
handleImmediate | the callback to schedule |
---|
inlinereadString(key:String):String
Read a string for the given key
Parameters:
key | the key to use |
---|
Returns:
String or null of no string was found
inlinesaveString(key:String, str:String):Bool
Save a string for the given key
Parameters:
key | the key to use |
---|---|
str | the string to save |
Returns:
Bool true
if the save was successful
inlineappendString(key:String, str:String):Bool
Append a string on the given key. If the key doesn't exist, creates a new one with the string to append.
Parameters:
key | the key to use |
---|---|
str | the string to append |
Returns:
Bool true
if the save was successful
inlinewarning(message:Dynamic, ?pos:Null<PosInfos>):Void
Log a warning message
Parameters:
message | the warning message |
---|
inlineerror(error:Dynamic, ?pos:Null<PosInfos>):Void
Log an error message
Parameters:
error | the error message |
---|
inlinesuccess(message:Dynamic, ?pos:Null<PosInfos>):Void
Log a success message
Parameters:
message | the success message |
---|
inlinerunInBackground(callback:() ‑> Void):Void
Run the given callback in background, if there is any background thread available on this backend. Run it on the main thread otherwise like any other code
Parameters:
null | callback |
---|
inlinerunInMain(callback:() ‑> Void):Void
Run the given callback in main thread
Parameters:
null | callback |
---|
inlineinterval(owner:Entity, seconds:Float, callback:() ‑> Void):() ‑> Void
Execute a callback periodically at the given interval in seconds.
Parameters:
owner | The entity that owns this interval |
---|---|
seconds | The time in seconds between each call |
callback | The callback to call |
Returns:
Void->Void A callback to cancel the interval
inlinedelay(owner:Entity, seconds:Float, callback:() ‑> Void):() ‑> Void
Execute a callback after the given delay in seconds.
Parameters:
owner | The entity that owns this delayed call |
---|---|
seconds | The time in seconds of delay before the call |
callback | The callback to call |
Returns:
Void->Void A callback to cancel the delayed call
inlinestorageDirectory():Null<String>
Get storage directory (if any available)
Returns:
directory as string or null if nothing available