Base class for any scripting languages to inherit from.

Usage:

This class should be mainly used for creating different types
of scripts of different languages. Like how Leather Engine supports
both Lua and HScript, if you were to add another language
you would just extend this (aka Python or something, idk what your plans are).

Constructor

@:value({ executeOn : BOTH })new(path:String, executeOn:ExecuteOn = BOTH)

Variables

Methods

call(func:String, ?arguments:Array<Any>):Bool

Calls the desired func (function) with the specified arguments.

Parameters:

func

The function name to call in the script.

arguments

(Optional) Array of arguments to run the func (function) with.

Returns:

true if the function was successfully ran, false if the function was unsuccessful, and null if the function was not specified.

set(variable:String, value:Any):Void

Sets the desired variable to the specified value.

Parameters:

variable

String name for the variable to set.

value

Any value to set the variable to.

setup():Void

Setup the enviroment for a script.

Returns:

true if the enviroment was setup correctly, false if there was an exception, and null if the function wasn't specified.