private MinMaxCurve GetMinMaxCurveFromMMC(UnityEngine.ParticleSystem.MinMaxCurve mmc, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
        {
            MinMaxCurve minMaxCurve = new MinMaxCurve();

            minMaxCurve.mode = (int)mmc.mode;
            if (mmc.mode == ParticleSystemCurveMode.Constant)
            {
                minMaxCurve.constantMax = mmc.constant;
            }
            else if (mmc.mode == ParticleSystemCurveMode.TwoConstants)
            {
                minMaxCurve.constantMax = mmc.constantMax;
                minMaxCurve.constantMin = mmc.constantMin;
            }
            else if (mmc.mode == ParticleSystemCurveMode.Curve)
            {
                minMaxCurve.curveMax = GetCurveEntityFromAnimationCurve(mmc.curve, mmc.curveMultiplier, dstManager, conversionSystem);
            }
            else if (mmc.mode == ParticleSystemCurveMode.TwoCurves)
            {
                minMaxCurve.curveMax = GetCurveEntityFromAnimationCurve(mmc.curveMax, mmc.curveMultiplier, dstManager, conversionSystem);
                minMaxCurve.curveMin = GetCurveEntityFromAnimationCurve(mmc.curveMin, mmc.curveMultiplier, dstManager, conversionSystem);
            }

            return(minMaxCurve);
        }
Example #2
0
        /// <summary>
        /// Create VGO_PS_MinMaxCurve from MinMaxCurve.
        /// </summary>
        /// <param name="minMaxCurve"></param>
        /// <returns></returns>
        public static VGO_PS_MinMaxCurve CreateFrom(MinMaxCurve minMaxCurve)
        {
            switch (minMaxCurve.mode)
            {
            case ParticleSystemCurveMode.Constant:
                return(new VGO_PS_MinMaxCurve()
                {
                    mode = ParticleSystemCurveMode.Constant,
                    constant = minMaxCurve.constant,
                });

            case ParticleSystemCurveMode.Curve:
                return(new VGO_PS_MinMaxCurve()
                {
                    mode = ParticleSystemCurveMode.Curve,
                    curveMultiplier = minMaxCurve.curveMultiplier,
                    curve = VgoAnimationCurveConverter.CreateFrom(minMaxCurve.curve),
                });

            case ParticleSystemCurveMode.TwoCurves:
                return(new VGO_PS_MinMaxCurve()
                {
                    mode = ParticleSystemCurveMode.TwoCurves,
                    curveMultiplier = minMaxCurve.curveMultiplier,
                    curveMin = VgoAnimationCurveConverter.CreateFrom(minMaxCurve.curveMin),
                    curveMax = VgoAnimationCurveConverter.CreateFrom(minMaxCurve.curveMax),
                });

            case ParticleSystemCurveMode.TwoConstants:
                return(new VGO_PS_MinMaxCurve()
                {
                    mode = ParticleSystemCurveMode.TwoConstants,
                    constantMin = minMaxCurve.constantMin,
                    constantMax = minMaxCurve.constantMax,
                });

            default:
                return(null);
            }
        }
Example #3
0
            }                                                                                                   // 0x0000000180AF1D60-0x0000000180AF1DB0

            private static void set_rateOverTime_Injected(ref EmissionModule _unity_self, ref MinMaxCurve value)
            {
            }                                                                                                                   // 0x0000000180AF1DB0-0x0000000180AF1E50
 public Burst(float _time, MinMaxCurve _count, int _cycleCount, float _repeatInterval)
 {
     m_Time = _time; m_Count = _count; m_RepeatCount = _cycleCount - 1; m_RepeatInterval = _repeatInterval;
 }
 public Burst(float _time, MinMaxCurve _count)
 {
     m_Time = _time; m_Count = _count; m_RepeatCount = 0; m_RepeatInterval = 0.0f;
 }
 public Burst(float _time, short _minCount, short _maxCount, int _cycleCount, float _repeatInterval)
 {
     m_Time = _time; m_Count = new MinMaxCurve(_minCount, _maxCount); m_RepeatCount = _cycleCount - 1; m_RepeatInterval = _repeatInterval;
 }
 public Burst(float _time, short _minCount, short _maxCount)
 {
     m_Time = _time; m_Count = new MinMaxCurve(_minCount, _maxCount); m_RepeatCount = 0; m_RepeatInterval = 0.0f;
 }
Example #8
0
 extern public void SetVector(ParticleSystemCustomData stream, int component, MinMaxCurve curve);