public void SetDeleteMode(WaterfallController ctrl, ModuleWaterfallFX mod) { showWindow = true; control = ctrl; fxMod = mod; windowMode = ControllerPopupMode.Delete; GUI.BringWindowToFront(windowID); }
public void SetDeleteMode(WaterfallController ctrl, ModuleWaterfallFX mod) { showWindow = true; control = ctrl; fxMod = mod; windowMode = ControllerPopupMode.Delete; WindowPosition = new Rect(Screen.width / 2 - 100, Screen.height / 2f - 50, 200, 100); }
public void SetAddMode(ModuleWaterfallFX mod) { showWindow = true; fxMod = mod; windowMode = ControllerPopupMode.Add; selectedControllerIndex = 0; GUI.BringWindowToFront(windowID); }
public void SetEditMode(WaterfallController ctrl, ModuleWaterfallFX mod) { windowMode = ControllerPopupMode.Modify; showWindow = true; control = ctrl; fxMod = mod; newControllerName = ctrl.name; selectedControllerIndex = controllerTypes.IndexOf(ctrl.GetType()); GUI.BringWindowToFront(windowID); controllerOptions[selectedControllerIndex].LoadOptions(ctrl); }
public void SetAddMode(ModuleWaterfallFX mod) { showWindow = true; fxMod = mod; windowMode = ControllerPopupMode.Add; controllerFlag = 0; WindowPosition = new Rect(Screen.width / 2, Screen.height / 2f, 400, 400); eventCurve = new FloatCurve(); eventCurve.Add(0f, 0f); eventCurve.Add(0.1f, 1f); eventCurve.Add(1f, 0f); GenerateCurveThumbs(); }
public void SetEditMode(WaterfallController ctrl, ModuleWaterfallFX mod) { showWindow = true; control = ctrl; fxMod = mod; newControllerName = ctrl.name; controllerFlag = controllerTypes.ToList().IndexOf(ctrl.linkedTo); windowMode = ControllerPopupMode.Modify; WindowPosition = new Rect(Screen.width / 2 - 100, Screen.height / 2f - 50, 400, 100); eventCurve = new FloatCurve(); if (control is RandomnessController r) { if (r.noiseType == "random") { randomStrings[0] = r.range.x.ToString(); randomStrings[1] = r.range.y.ToString(); } if (r.noiseType == "perlin") { randomStrings[0] = r.seed.ToString(); randomStrings[1] = r.scale.ToString(); randomStrings[2] = r.speed.ToString(); randomStrings[3] = r.minimum.ToString(); } } else if (control is EngineEventController e) { eventCurve = e.eventCurve; eventDuration = e.eventDuration; eventDurationString = e.eventDuration.ToString(); } else if (control is ThrottleController t) { throttleStrings[0] = t.responseRateUp.ToString(); throttleStrings[1] = t.responseRateDown.ToString(); } else if (control is RCSController rcs) { throttleStrings[0] = rcs.responseRateUp.ToString(); throttleStrings[1] = rcs.responseRateDown.ToString(); } GenerateCurveThumbs(); }