Exemple #1
0
 private void StartInternal()
 {
     Print("Script starting");
     OnStart();
     MainThread = new ScriptThread(OnTick);
     OnStarted();
 }
Exemple #2
0
 private void TerminateInternal(string message = "Script terminated")
 {
     OnTerminate();
     IsRunning = false;
     MainThread = null;
     ThreadPool.Clear();
     Print(message);
     OnTerminated();
 }
Exemple #3
0
 protected ScriptThread StartThread(Action action)
 {
     var thread = new ScriptThread(action);
     ThreadPool.Add(thread);
     return thread;
 }