Example #1
0
 public void InvokeThreadFunction(ScriptThread thread)
 {
     ScriptThread actionThread = ((NativeObject)thread.GetObjectParameter(0)).Object as ScriptThread;
     if (actionThread == null)
     {
         DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called InvokeThreadFunction with an invalid object.", LogAlertLevel.Error);
         return;
     }
     actionThread.InvokeFunction(thread.GetStringParameter(1), thread.GetBooleanParameter(2), thread.GetBooleanParameter(3), false);
 }
 public void ExecuteFile(ScriptThread thread)
 {
     Process process = new Process();
     process.StartInfo.FileName = thread.GetStringParameter(0);
     process.StartInfo.Arguments = thread.GetStringParameter(1);
     process.StartInfo.Verb = "Open";
     process.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
     process.Start();
     if (thread.GetBooleanParameter(2) == true) process.WaitForExit();
 }
Example #3
0
 public void SetSceneGraphRender(ScriptThread thread)
 {
     Fusion.GlobalInstance.Window.RenderSceneGraph = thread.GetBooleanParameter(0);
 }
Example #4
0
 public void StreamWriteA(ScriptThread thread)
 {
     ScriptStream stream = ((NativeObject)thread.GetObjectParameter(0)).Object as ScriptStream;
     if (stream == null)
     {
         DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called StreamWrite with an invalid object.", LogAlertLevel.Error);
         return;
     }
     stream.Writer.Write(thread.GetBooleanParameter(1));
 }
Example #5
0
 public void SetChannelLooping(ScriptThread thread)
 {
     ISampleBuffer sound = ((NativeObject)thread.GetObjectParameter(0)).Object as ISampleBuffer;
     if (sound == null)
     {
         DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called SetChannelLooping with an invalid object.", LogAlertLevel.Error);
         return;
     }
     sound.Looping = thread.GetBooleanParameter(1);
 }
Example #6
0
 public void SetEntityVisible(ScriptThread thread)
 {
     EntityNode entity = ((NativeObject)thread.GetObjectParameter(0)).Object as EntityNode;
     if (entity == null)
     {
         DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called SetEntityVisible with an invalid object.", LogAlertLevel.Error);
         return;
     }
     entity.IsVisible = thread.GetBooleanParameter(1);
 }