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();
                });
            }
        }
Пример #2
0
        /// <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);
                    }
                });
            }
        }
Пример #3
0
 public ParticleBurst(float time, FloatDistribution count, uint cycles = 1, float interval = 1f)
 {
     this.time     = time;
     this.count    = count;
     this.cycles   = cycles;
     this.interval = interval;
 }
Пример #4
0
 private static extern void Internal_TDistribution3(FloatDistribution managedInstance, AnimationCurve minCurve, AnimationCurve maxCurve);
Пример #5
0
 private static extern void Internal_TDistribution1(FloatDistribution managedInstance, float minValue, float maxValue);
Пример #6
0
 private static extern void Internal_TDistribution0(FloatDistribution managedInstance, float value);
Пример #7
0
 private static extern void Internal_TDistribution(FloatDistribution managedInstance);
Пример #8
0
 private static extern void Internal_setValue(IntPtr thisPtr, FloatDistribution value);
Пример #9
0
 private static extern void Internal_setInitialRotation(IntPtr thisPtr, FloatDistribution value);
Пример #10
0
 /// <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;
 }
Пример #11
0
 public Random(TaskId task, FloatDistribution success)
     : base(task)
 {
     this.SuccessValue = success;
 }
Пример #12
0
 public Random(FloatDistribution success)
 {
     this.SuccessValue = success;
 }