Ejemplo n.º 1
0
 public static void closeGUI()
 {
     sortKeys(true);
     updateFloatCurve();
     module.thrustCurveGuiClosed(presetName, curve);
     //module.closeGui(curve, presetName);
     MonoBehaviour.Destroy(texture);
     curve   = null;
     module  = null;
     presets = null;
     curveData.Clear();
     MonoBehaviour.Destroy(activeGUI);
 }
Ejemplo n.º 2
0
 public static void openGUI(SSTUEngineThrustCurveGUI srbModule, string preset, FloatCurve inputCurve)
 {
     module = srbModule;
     id     = module.GetInstanceID();
     MonoBehaviour.print("ThrustCurveEditor-input curve: " + curve + "\n" + SSTUUtils.printFloatCurve(curve));
     presetName = preset;
     setupCurveData(inputCurve);
     texture = new Texture2D(graphWidth, graphHeight);
     updateGraphTexture();
     loadPresets();
     if (activeGUI == null)
     {
         activeGUI = srbModule.gameObject.AddComponent <ThrustCurveEditorGUI>();
         SSTULog.debug("Created new gui object: " + activeGUI);
     }
 }