Esempio n. 1
0
        private void MapTrailParameters(ParticleSystem pSystem, int i)
        {
            ParticleSystem.TrailModule trailModule = pSystem.trails;

            try {
                trailModule.enabled = GetBoolParam(i, "trails_enabled");
            }
            catch (NullReferenceException) {
                trailModule.enabled = false;
                return;
            }

            trailModule.textureMode          = (ParticleSystemTrailTextureMode)GetIntParam(i, "trails_textureMode");
            trailModule.worldSpace           = GetBoolParam(i, "trails_worldSpace");
            trailModule.dieWithParticles     = GetBoolParam(i, "trails_dieWithParticles");
            trailModule.sizeAffectsWidth     = GetBoolParam(i, "trails_sizeAffectsWidth");
            trailModule.sizeAffectsLifetime  = GetBoolParam(i, "trails_sizeAffectsLifetime");
            trailModule.inheritParticleColor = GetBoolParam(i, "trails_inheritParticleColor");
            trailModule.generateLightingData = GetBoolParam(i, "trails_generateLightingData");
            trailModule.minVertexDistance    = GetFloatParam(i, "trails_minimumVertexDistance");
            trailModule.ratio             = GetFloatParam(i, "trails_ratio");
            trailModule.widthOverTrail    = NodeFXUtilities.InterpretStringToCurve(GetStringParam(i, "trails_widthOverTrail"));
            trailModule.lifetime          = NodeFXUtilities.InterpretStringToCurve(GetStringParam(i, "trails_lifetime"));
            trailModule.colorOverLifetime = NodeFXUtilities.InterpretStringToGradient(GetStringParam(i, "trails_colorOverLifetime"));
            trailModule.colorOverTrail    = NodeFXUtilities.InterpretStringToGradient(GetStringParam(i, "trails_colorOverTrail"));
        }
Esempio n. 2
0
 private void MapMainParameters(ParticleSystem pSystem, int i)
 {
     ParticleSystem.MainModule mainModule = pSystem.main;
     mainModule.stopAction          = (ParticleSystemStopAction)GetIntParam(i, "main_stopAction");
     mainModule.emitterVelocityMode = (ParticleSystemEmitterVelocityMode)GetIntParam(i, "main_emitterVelocity");
     mainModule.scalingMode         = (ParticleSystemScalingMode)GetIntParam(i, "main_scalingMode");
     mainModule.simulationSpace     = (ParticleSystemSimulationSpace)GetIntParam(i, "main_simulationSpace");
     mainModule.maxParticles        = GetIntParam(i, "main_maxParticles");
     mainModule.loop            = GetBoolParam(i, "main_looping");
     mainModule.prewarm         = GetBoolParam(i, "main_prewarm");
     mainModule.startSize3D     = GetBoolParam(i, "main_3DStartSize");
     mainModule.startRotation3D = GetBoolParam(i, "main_3DStartRotation");
     mainModule.useUnscaledTime = GetBoolParam(i, "main_deltaTime");
     mainModule.playOnAwake     = GetBoolParam(i, "main_playOnAwake");
     pSystem.useAutoRandomSeed  = GetBoolParam(i, "main_autoRandomSeed");
     mainModule.flipRotation    = GetFloatParam(i, "main_rotationVariance");
     mainModule.simulationSpeed = GetFloatParam(i, "main_simulationSpeed");
     mainModule.duration        = GetFloatParam(i, "main_duration");
     mainModule.startDelay      = NodeFXUtilities.InterpretStringToCurve(GetStringParam(i, "main_startDelay"));
     mainModule.startLifetime   = NodeFXUtilities.InterpretStringToCurve(GetStringParam(i, "main_startLifetime"));
     mainModule.startSpeed      = NodeFXUtilities.InterpretStringToCurve(GetStringParam(i, "main_startSpeed"));
     mainModule.startSize       = NodeFXUtilities.InterpretStringToCurve(GetStringParam(i, "main_startSize"));
     mainModule.startSizeX      = NodeFXUtilities.InterpretStringToCurve(GetStringParam(i, "main_startSize_x"));
     mainModule.startSizeY      = NodeFXUtilities.InterpretStringToCurve(GetStringParam(i, "main_startSize_y"));
     mainModule.startSizeZ      = NodeFXUtilities.InterpretStringToCurve(GetStringParam(i, "main_startSize_z"));
     mainModule.startRotation   = NodeFXUtilities.InterpretStringToCurve(GetStringParam(i, "main_startRotation"));
     mainModule.startRotationX  = NodeFXUtilities.InterpretStringToCurve(GetStringParam(i, "main_startRotation_x"));
     mainModule.startRotationY  = NodeFXUtilities.InterpretStringToCurve(GetStringParam(i, "main_startRotation_y"));
     mainModule.startRotationZ  = NodeFXUtilities.InterpretStringToCurve(GetStringParam(i, "main_startRotation_z"));
     mainModule.gravityModifier = NodeFXUtilities.InterpretStringToCurve(GetStringParam(i, "main_gravityModifier"));
     mainModule.startColor      = NodeFXUtilities.InterpretStringToGradient(GetStringParam(i, "main_startColor"));
     pSystem.randomSeed         = 0;
 }
Esempio n. 3
0
        private void MapColorOverLifetimeParameters(ParticleSystem pSystem, int i)
        {
            ParticleSystem.ColorOverLifetimeModule colorOverLifetimeModule = pSystem.colorOverLifetime;

            try {
                colorOverLifetimeModule.enabled = GetBoolParam(i, "colorOverLifetime_enabled");
            }
            catch (NullReferenceException) {
                colorOverLifetimeModule.enabled = false;
                return;
            }

            colorOverLifetimeModule.color = NodeFXUtilities.InterpretStringToGradient(GetStringParam(i, "colorOverLifetime_color"));
        }
Esempio n. 4
0
        private void MapColorBySpeedParameters(ParticleSystem pSystem, int i)
        {
            ParticleSystem.ColorBySpeedModule colorBySpeedModule = pSystem.colorBySpeed;

            try {
                colorBySpeedModule.enabled = GetBoolParam(i, "colorBySpeed_enabled");
            }
            catch (NullReferenceException) {
                colorBySpeedModule.enabled = false;
                return;
            }

            colorBySpeedModule.range = GetVectorParam(i, "colorBySpeed_range");
            colorBySpeedModule.color = NodeFXUtilities.InterpretStringToGradient(GetStringParam(i, "colorBySpeed_color"));
        }