private void LegacyParticleSpeed(float fSpeed)
    {
        ParticleEmitter  pe = this.m_pe;
        ParticleAnimator pa = this.m_pa;
        ParticleRenderer pr = this.m_pr;

        if (pe == null || pr == null)
        {
            return;
        }
        Vector3         vector  = Vector3.get_one() * fSpeed;
        ParticleEmitter expr_3B = pe;

        expr_3B.set_minEnergy(expr_3B.get_minEnergy() / fSpeed);
        ParticleEmitter expr_49 = pe;

        expr_49.set_maxEnergy(expr_49.get_maxEnergy() / fSpeed);
        pe.set_worldVelocity(Vector3.Scale(pe.get_worldVelocity(), vector));
        pe.set_localVelocity(Vector3.Scale(pe.get_localVelocity(), vector));
        pe.set_rndVelocity(Vector3.Scale(pe.get_rndVelocity(), vector));
        ParticleEmitter expr_8D = pe;

        expr_8D.set_angularVelocity(expr_8D.get_angularVelocity() * fSpeed);
        ParticleEmitter expr_9B = pe;

        expr_9B.set_rndAngularVelocity(expr_9B.get_rndAngularVelocity() * fSpeed);
        ParticleEmitter expr_A9 = pe;

        expr_A9.set_emitterVelocityScale(expr_A9.get_emitterVelocityScale() * fSpeed);
        if (pa != null)
        {
            pa.set_rndForce(Vector3.Scale(pa.get_rndForce(), vector));
            pa.set_force(Vector3.Scale(pa.get_force(), vector));
        }
    }
    private static int set_rndForce(IntPtr L)
    {
        object obj = null;
        int    result;

        try
        {
            obj = ToLua.ToObject(L, 1);
            ParticleAnimator particleAnimator = (ParticleAnimator)obj;
            Vector3          rndForce         = ToLua.ToVector3(L, 2);
            particleAnimator.set_rndForce(rndForce);
            result = 0;
        }
        catch (Exception ex)
        {
            result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.get_Message() : "attempt to index rndForce on a nil value");
        }
        return(result);
    }
    private void LegacySetParticle()
    {
        ParticleEmitter  pe = this.m_pe;
        ParticleAnimator pa = this.m_pa;
        ParticleRenderer pr = this.m_pr;

        if (pe == null || pr == null)
        {
            return;
        }
        if (this.m_bLegacyRuntimeScale)
        {
            Vector3         vector          = Vector3.get_one() * this.m_fStartSpeedRate;
            float           fStartSpeedRate = this.m_fStartSpeedRate;
            ParticleEmitter expr_53         = pe;
            expr_53.set_minSize(expr_53.get_minSize() * this.m_fStartSizeRate);
            ParticleEmitter expr_66 = pe;
            expr_66.set_maxSize(expr_66.get_maxSize() * this.m_fStartSizeRate);
            ParticleEmitter expr_79 = pe;
            expr_79.set_minEnergy(expr_79.get_minEnergy() * this.m_fStartLifeTimeRate);
            ParticleEmitter expr_8C = pe;
            expr_8C.set_maxEnergy(expr_8C.get_maxEnergy() * this.m_fStartLifeTimeRate);
            ParticleEmitter expr_9F = pe;
            expr_9F.set_minEmission(expr_9F.get_minEmission() * this.m_fStartEmissionRate);
            ParticleEmitter expr_B2 = pe;
            expr_B2.set_maxEmission(expr_B2.get_maxEmission() * this.m_fStartEmissionRate);
            pe.set_worldVelocity(Vector3.Scale(pe.get_worldVelocity(), vector));
            pe.set_localVelocity(Vector3.Scale(pe.get_localVelocity(), vector));
            pe.set_rndVelocity(Vector3.Scale(pe.get_rndVelocity(), vector));
            ParticleEmitter expr_FB = pe;
            expr_FB.set_angularVelocity(expr_FB.get_angularVelocity() * fStartSpeedRate);
            ParticleEmitter expr_10A = pe;
            expr_10A.set_rndAngularVelocity(expr_10A.get_rndAngularVelocity() * fStartSpeedRate);
            ParticleEmitter expr_119 = pe;
            expr_119.set_emitterVelocityScale(expr_119.get_emitterVelocityScale() * fStartSpeedRate);
            if (pa != null)
            {
                pa.set_rndForce(Vector3.Scale(pa.get_rndForce(), vector));
                pa.set_force(Vector3.Scale(pa.get_force(), vector));
            }
            ParticleRenderer expr_158 = pr;
            expr_158.set_lengthScale(expr_158.get_lengthScale() * this.m_fRenderLengthRate);
        }
        else
        {
            Vector3         vector2  = ((!this.m_bScaleWithTransform) ? Vector3.get_one() : pe.get_transform().get_lossyScale()) * this.m_fStartSpeedRate;
            float           num      = ((!this.m_bScaleWithTransform) ? 1f : NcTransformTool.GetTransformScaleMeanValue(pe.get_transform())) * this.m_fStartSpeedRate;
            float           num2     = ((!this.m_bScaleWithTransform) ? 1f : NcTransformTool.GetTransformScaleMeanValue(pe.get_transform())) * this.m_fStartSizeRate;
            ParticleEmitter expr_1EF = pe;
            expr_1EF.set_minSize(expr_1EF.get_minSize() * num2);
            ParticleEmitter expr_1FE = pe;
            expr_1FE.set_maxSize(expr_1FE.get_maxSize() * num2);
            ParticleEmitter expr_20D = pe;
            expr_20D.set_minEnergy(expr_20D.get_minEnergy() * this.m_fStartLifeTimeRate);
            ParticleEmitter expr_220 = pe;
            expr_220.set_maxEnergy(expr_220.get_maxEnergy() * this.m_fStartLifeTimeRate);
            ParticleEmitter expr_233 = pe;
            expr_233.set_minEmission(expr_233.get_minEmission() * this.m_fStartEmissionRate);
            ParticleEmitter expr_246 = pe;
            expr_246.set_maxEmission(expr_246.get_maxEmission() * this.m_fStartEmissionRate);
            pe.set_worldVelocity(Vector3.Scale(pe.get_worldVelocity(), vector2));
            pe.set_localVelocity(Vector3.Scale(pe.get_localVelocity(), vector2));
            pe.set_rndVelocity(Vector3.Scale(pe.get_rndVelocity(), vector2));
            ParticleEmitter expr_292 = pe;
            expr_292.set_angularVelocity(expr_292.get_angularVelocity() * num);
            ParticleEmitter expr_2A1 = pe;
            expr_2A1.set_rndAngularVelocity(expr_2A1.get_rndAngularVelocity() * num);
            ParticleEmitter expr_2B0 = pe;
            expr_2B0.set_emitterVelocityScale(expr_2B0.get_emitterVelocityScale() * num);
            if (pa != null)
            {
                pa.set_rndForce(Vector3.Scale(pa.get_rndForce(), vector2));
                pa.set_force(Vector3.Scale(pa.get_force(), vector2));
            }
            ParticleRenderer expr_2F1 = pr;
            expr_2F1.set_lengthScale(expr_2F1.get_lengthScale() * this.m_fRenderLengthRate);
        }
    }