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