Sinespace Client
2023.2.17543
Client-side scripting for Sinespace
|
Public Member Functions | |
override void | Initialise (SScript runtime, object wrapper) |
void | SetGlobal (string ns, string key, DynValue value) |
void | SetSuperGlobal (string ns, string key, DynValue value) |
DynValue | GetGlobal (string ns, string key) |
Retrieves a previously set global variable, or returns nil. More... | |
DynValue | GetSuperGlobal (string ns, string key) |
Retrieves a previously set superglobal variable, or returns nil. More... | |
void | RegisterFunction (string ns, string func, Closure reference) |
void | RegisterBroadcastFunction (string ns, string func, Closure reference) |
void | UnregisterBroadcastFunction (string ns, string func, Closure reference) |
void | UnregisterBroadcastFunction (string ns, string func) |
void | CallFunction (string ns, string func, IEnumerable< DynValue > args) |
int | CallBroadcastFunction (string ns, string func, IEnumerable< DynValue > args) |
Calls every registered broadcast function with specified arguments, and returns the number of calls queued. More... | |
Public Member Functions inherited from ScriptClass< T > | |
void | ReportError (string error, bool fatal, UnityEngine.Object target=null) |
Public Member Functions inherited from ScriptClassWrapper< T > | |
override void | Initialise (SScript runtime, object wrapper) |
Additional Inherited Members | |
Protected Member Functions inherited from ScriptClass< T > | |
void | Initialise (SScript runtime) |
Properties inherited from ScriptClass< T > | |
override bool | Alive [get] |
Return if the component is alive. More... | |
virtual bool | Alive [get] |
DynValue | CachedData [get, set] |
Properties inherited from ScriptClassWrapper< T > | |
T | _wrap [get] |
int SineSpace.Scripting.Client.SShared.CallBroadcastFunction | ( | string | ns, |
string | func, | ||
IEnumerable< DynValue > | args | ||
) |
Calls every registered broadcast function with specified arguments, and returns the number of calls queued.
Functions will be called at the start of their next execution context, which may be in the next frame.
ns | |
func | |
args |
void SineSpace.Scripting.Client.SShared.CallFunction | ( | string | ns, |
string | func, | ||
IEnumerable< DynValue > | args | ||
) |
DynValue SineSpace.Scripting.Client.SShared.GetGlobal | ( | string | ns, |
string | key | ||
) |
Retrieves a previously set global variable, or returns nil.
These variables are shared between scripts, hence a namespace is required
ns | A namespace, suggest using reverse-DNS ordering, e.g. com.sinewaveentertainment.someScript |
key | A individual key name for a variable |
DynValue SineSpace.Scripting.Client.SShared.GetSuperGlobal | ( | string | ns, |
string | key | ||
) |
Retrieves a previously set superglobal variable, or returns nil.
Unlike globals, superglobals are not reset by a teleport to another scene.
These variables are shared between scripts, hence a namespace is required
ns | A namespace, suggest using reverse-DNS ordering, e.g. com.sinewaveentertainment.someScript |
key | A individual key name for a variable |
|
virtual |
Implements ScriptClass< T >.
void SineSpace.Scripting.Client.SShared.RegisterBroadcastFunction | ( | string | ns, |
string | func, | ||
Closure | reference | ||
) |
void SineSpace.Scripting.Client.SShared.RegisterFunction | ( | string | ns, |
string | func, | ||
Closure | reference | ||
) |
void SineSpace.Scripting.Client.SShared.SetGlobal | ( | string | ns, |
string | key, | ||
DynValue | value | ||
) |
void SineSpace.Scripting.Client.SShared.SetSuperGlobal | ( | string | ns, |
string | key, | ||
DynValue | value | ||
) |
void SineSpace.Scripting.Client.SShared.UnregisterBroadcastFunction | ( | string | ns, |
string | func | ||
) |
void SineSpace.Scripting.Client.SShared.UnregisterBroadcastFunction | ( | string | ns, |
string | func, | ||
Closure | reference | ||
) |