示例#1
0
        /// /////////////////////////////////////////////////////////
        /// Common
        /// /////////////////////////////////////////////////////////

        // Constructor
        public RayfireDebris()
        {
            onDemolition = false;
            onActivation = false;
            onImpact     = false;

            debrisReference  = null;
            debrisMaterial   = null;
            emissionMaterial = null;

            emission    = new RFParticleEmission();
            dynamic     = new RFParticleDynamicDebris();
            noise       = new RFParticleNoise();
            collision   = new RFParticleCollisionDebris();
            limitations = new RFParticleLimitations();
            rendering   = new RFParticleRendering();

            // Hidden
            debrisMeshList = new List <Mesh>();

            //pSystem = null;
            hostTm      = null;
            initialized = false;
            amountFinal = 0;
        }
示例#2
0
 // Copy from
 public void CopyFrom(RFParticleNoise source)
 {
     enabled     = source.enabled;
     strengthMin = source.strengthMin;
     strengthMax = source.strengthMax;
     frequency   = source.frequency;
     scrollSpeed = source.scrollSpeed;
     damping     = source.damping;
     quality     = source.quality;
 }
示例#3
0
        /// /////////////////////////////////////////////////////////
        /// Noise
        /// /////////////////////////////////////////////////////////

        // Set particle system noise
        public static void SetNoise(ParticleSystem.NoiseModule psNoise, RFParticleNoise scrNoise)
        {
            if (scrNoise.enabled == true)
            {
                psNoise.enabled     = true;
                psNoise.strength    = new ParticleSystem.MinMaxCurve(scrNoise.strengthMin, scrNoise.strengthMax);
                psNoise.frequency   = scrNoise.frequency;
                psNoise.scrollSpeed = scrNoise.scrollSpeed;
                psNoise.damping     = scrNoise.damping;
                psNoise.quality     = scrNoise.quality;


                psNoise.separateAxes = true;
                psNoise.strengthX    = new ParticleSystem.MinMaxCurve(scrNoise.strengthMin, scrNoise.strengthMax);
                psNoise.strengthY    = new ParticleSystem.MinMaxCurve(scrNoise.strengthMin * 0.3f, scrNoise.strengthMax * 0.3f);
                psNoise.strengthZ    = new ParticleSystem.MinMaxCurve(scrNoise.strengthMin, scrNoise.strengthMax);
            }
        }
示例#4
0
        // auto alpha fade
        // few dust textures with separate alphas

        /// /////////////////////////////////////////////////////////
        /// Common
        /// /////////////////////////////////////////////////////////

        // Constructor
        public RayfireDust()
        {
            onDemolition = true;
            onActivation = false;
            onImpact     = false;

            dustMaterial     = null;
            opacity          = 0.25f;
            emissionMaterial = null;

            emission    = new RFParticleEmission();
            dynamic     = new RFParticleDynamicDust();
            noise       = new RFParticleNoise();
            collision   = new RFParticleCollisionDust();
            limitations = new RFParticleLimitations();
            rendering   = new RFParticleRendering();

            // Hidden
            //pSystem = null;
            hostTm      = null;
            initialized = false;
            amountFinal = 5;
        }