partial void OnClicked(int component) { FloatDistribution distribution = Value; if (DistributionType == PropertyDistributionType.Curve) { CurveEditorWindow.Show(distribution.GetMinCurve(), (success, curve) => { if (!success) { return; } Value = new FloatDistribution(curve); OnChanged?.Invoke(); }); } else if (DistributionType == PropertyDistributionType.RandomCurveRange) { CurveEditorWindow.Show(distribution.GetMinCurve(), distribution.GetMaxCurve(), (success, minCurve, maxCurve) => { if (!success) { return; } Value = new FloatDistribution(minCurve, maxCurve); OnChanged?.Invoke(); }); } }
/// <summary> /// Callback triggered when the user clicks on the curve display in the GUI element. /// </summary> partial void OnClicked() { FloatDistribution distribution = Value; if (distribution.DistributionType == PropertyDistributionType.Curve) { CurveEditorWindow.Show(distribution.GetMinCurve(), (success, curve) => { if (success) { Value = new FloatDistribution(curve); } }); } else if (distribution.DistributionType == PropertyDistributionType.RandomCurveRange) { CurveEditorWindow.Show(distribution.GetMinCurve(), distribution.GetMaxCurve(), (success, minCurve, maxCurve) => { if (success) { Value = new FloatDistribution(minCurve, maxCurve); } }); } }
public ParticleBurst(float time, FloatDistribution count, uint cycles = 1, float interval = 1f) { this.time = time; this.count = count; this.cycles = cycles; this.interval = interval; }
private static extern void Internal_TDistribution3(FloatDistribution managedInstance, AnimationCurve minCurve, AnimationCurve maxCurve);
private static extern void Internal_TDistribution1(FloatDistribution managedInstance, float minValue, float maxValue);
private static extern void Internal_TDistribution0(FloatDistribution managedInstance, float value);
private static extern void Internal_TDistribution(FloatDistribution managedInstance);
private static extern void Internal_setValue(IntPtr thisPtr, FloatDistribution value);
private static extern void Internal_setInitialRotation(IntPtr thisPtr, FloatDistribution value);
/// <summary> /// Creates a <see cref="Wait{T}"/> task running for the specified number of seconds /// </summary> /// <param name="seconds">the random distribution determining the number of seconds to wait for</param> public Wait(FloatDistribution seconds) { this.Seconds = seconds; }
public Random(TaskId task, FloatDistribution success) : base(task) { this.SuccessValue = success; }
public Random(FloatDistribution success) { this.SuccessValue = success; }