예제 #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(RFParticleCollisionDebris source)
        {
            collidesWith = source.collidesWith;
            quality      = source.quality;
            radiusScale  = source.radiusScale;

            dampenType = source.dampenType;
            dampenMin  = source.dampenMin;
            dampenMax  = source.dampenMax;

            bounceType = source.bounceType;
            bounceMin  = source.bounceMin;
            bounceMax  = source.bounceMax;

            propertiesSet = source.propertiesSet;
        }
예제 #3
0
        /// /////////////////////////////////////////////////////////
        /// Collision
        /// /////////////////////////////////////////////////////////

        // Set collision for debris
        public static void SetCollisionDebris(ParticleSystem.CollisionModule psCollision, RFParticleCollisionDebris coll)
        {
            psCollision.enabled      = true;
            psCollision.type         = ParticleSystemCollisionType.World;
            psCollision.collidesWith = (int)coll.collidesWith - 1;
            psCollision.quality      = coll.quality;
            psCollision.radiusScale  = coll.radiusScale;
            psCollision.dampen       = new ParticleSystem.MinMaxCurve(coll.dampenMin, coll.dampenMax);
            psCollision.bounce       = new ParticleSystem.MinMaxCurve(coll.bounceMin, coll.bounceMax);

            //psCollision.enableDynamicColliders = false;
            //psCollision.lifetimeLoss = new ParticleSystem.MinMaxCurve(1f);
        }