Simple class for empty scripts or scripts whose language isn't imported yet.
new(path:String)
@:value([])variables:Map<String, Dynamic> = []
fileName:String
Script name (with extension)
@:value(null)path:String = null
Path to the script.
call(func:String, ?parameters:Array<Dynamic>):Dynamic
Calls the function func defined in the script.
func
Parameters:
Name of the function
parameters
(Optional) Parameters of the function.
Returns:
Result (if void, then null)
error(text:String, ?additionalInfo:Dynamic):Void
Shows an error from this script.
text
Text of the error (ex: Null Object Reference).
additionalInfo
Additional information you could provide.
load():Void
Loads the script
onCreate(path:String):Void
onDestroy():Void
onLoad():Void
reload():Void
Hot-reloads the script, if possible
setParent(variable:Dynamic):Void
Sets a script's parent object so that its properties can be accessed easily. Ex: Passing PlayState.instace will allow boyfriend to be typed instead of PlayState.instance.boyfriend.
PlayState.instace
boyfriend
PlayState.instance.boyfriend
variable
Parent variable.
setPublicMap(map:Map<String, Dynamic>):Void
HSCRIPT ONLY FOR NOW Sets the "public" variables map for ScriptPack
trace(v:Dynamic):Void
Traces something as this script.