Class ClientScript
Inherit from this class, constructor will be called automatically, but other scripts might have yet been loaded, you should use OnStart(). to initiate your script.
Inherited Members
Namespace: RageCoop.Client.Scripting
Assembly: RageCoop.Client.dll
Syntax
public abstract class ClientScript
Properties
CurrentFile
Get the ResourceFile instance where this script is loaded from.
Declaration
public ResourceFile CurrentFile { get; }
Property Value
Type | Description |
---|---|
ResourceFile |
CurrentResource
Get the ClientResource that this script belongs to.
Declaration
public ClientResource CurrentResource { get; }
Property Value
Type | Description |
---|---|
ClientResource |
Logger
Eqivalent of Logger in CurrentResource
Declaration
public Logger Logger { get; }
Property Value
Type | Description |
---|---|
Logger |
Methods
OnStart()
This method would be called from background thread, call QueueAction(Action) to dispatch it to main thread.
Declaration
public abstract void OnStart()
OnStop()
This method would be called from background thread when the client disconnected from the server, you MUST terminate all background jobs/threads in this method.
Declaration
public abstract void OnStop()