private void RunScript(string file) { if (script != null) { script.Stop(); } script = LunaScript.CompileScript(file); if (script != null) { script.Start(luna); } }
private void switchTo(int index) { switch (previousTabIndex) { case 0: script.Stop(); break; case 1: script.Stop(); break; case 2: previewControl1.StopRenderLoop(); break; case 3: script.Stop(); break; case 4: script.Stop(); break; case 5: script.Stop(); break; case 6: script.Stop(); break; } previousTabIndex = index; switch (previousTabIndex) { case 0: script = new SettingsScript(); script.Start(luna); break; case 1: script = new LightScript(); script.Start(luna); break; case 2: previewControl1.StartRenderLoop(); break; case 4: script = new SoundScript(); (script as SoundScript).spectrumViz = spectrumVisualizerControl1; script.Start(luna); break; case 5: script = new FlameScript(); script.Start(luna); break; case 6: script = new PlasmaScript(); script.Start(luna); break; } }
private void RunScript(string file) { if (script != null) { script.Stop(); } script = LunaScript.CompileScript(file); if (script != null) { script.Start(luna); } }
private void switchTo(int index) { switch (previousTabIndex) { case 0: script.Stop(); break; case 1: script.Stop(); break; case 2: previewControl1.StopRenderLoop(); break; case 3: script.Stop(); break; case 4: script.Stop(); break; case 5: script.Stop(); break; case 6: script.Stop(); break; } previousTabIndex = index; switch (previousTabIndex) { case 0: script = new SettingsScript(); script.Start(luna); break; case 1: script = new LightScript(); script.Start(luna); break; case 2: previewControl1.StartRenderLoop(); break; case 4: script = new SoundScript(); (script as SoundScript).spectrumViz = spectrumVisualizerControl1; script.Start(luna); break; case 5: script = new FlameScript(); script.Start(luna); break; case 6: script = new PlasmaScript(); script.Start(luna); break; } }