Base class for any API-wrapped object
Instance Variables
exports
Type
Dynamic
Initial Value
null
Description
Generic exports object accessible via the Api's global scope. Arbitrary variables and functions can be attached to it, but note that this object will not be automatically serialized for rollback.
Instance Functions
isDisposed():Bool
Description
makeArray(value:Array<Dynamic>):ApiVarArray
Description
Allocates an Array of objects references. Note that this data type only serializes the pointer to the objects you set it to rather than literally serializing the data within the object. When the historical state of your ApiVarerenceArray is popped, the reference to the Array that existed at the time the history was last pushed will be restored. Parameters:
- value - Object reference array to serialize
makeBool(value:Bool):ApiVarBool
Description
Allocates a serializable boolean Parameters:
- value - Initial value of boolean
makeEaseTimer(from:Float, to:Float, length:Int, easeType?:Int):EaseTimer
Description
Allocates a rollback-friendly EaseTimer instance that will be automatically destroyed when this object is disposed of.
makeFloat(value:Float):ApiVarFloat
Description
Allocates a serializable float Parameters:
- value - Initial value of float
makeFrameTimer(initDuration:Int):FrameTimer
Description
Allocates a rollback-friendly FrameTimer instance that will be automatically destroyed when this object is disposed of.
makeInt(value:Float):ApiVarInt
Description
Allocates a serializable integer Parameters:
- value - Initial value of integer
makeObject(value:Dynamic):ApiVarObject
Description
Allocates a serializable object. Unlike serializable primitives, this only serializes the pointer to the objects you set it to rather than literally serializing the data within the object. When the historical state of your ApiObject is popped, the reference to the object that existed at the time the history was last pushed will be restored. ApiObjects will be serialized by the engine, however for anonymous structures you must manage their internal history yourself. Parameters:
- value - Object to store a reference to
makePoint(x?:Float, y?:Float):Point
Description
Allocates a rollback-friendly Point instance that will be automatically destroyed when this object is disposed of.
makeString(value:String):ApiVarString
Description
Allocates a serializable string. Maximum limit of serializable strings is currently 4 per object. Parameters:
- value - Initial value of string