Esempio n. 1
0
        internal void Validate(WaterConstantRipplesModuleParameters parameters)
        {
            IsActive                             = parameters.IsActive;
            UpdateWhenOffscreen                  = parameters.UpdateWhenOffscreen;
            RandomizeDisturbance                 = parameters.RandomizeDisturbance;
            SmoothRipples                        = parameters.SmoothDisturbance;
            SmoothingFactor                      = parameters.SmoothFactor;
            Disturbance                          = parameters.Disturbance;
            MinimumDisturbance                   = parameters.MinimumDisturbance;
            MaximumDisturbance                   = parameters.MaximumDisturbance;
            RandomizeTimeInterval                = parameters.RandomizeInterval;
            TimeInterval                         = parameters.Interval;
            MinimumTimeInterval                  = parameters.MinimumInterval;
            MaximumTimeInterval                  = parameters.MaximumInterval;
            RandomizeRipplesSourcePositions      = parameters.RandomizeRipplesSourcesPositions;
            RandomRipplesSourceCount             = parameters.RandomizeRipplesSourcesCount;
            AllowDuplicateRipplesSourcePositions = parameters.AllowDuplicateRipplesSourcesPositions;
            SourcePositions                      = parameters.SourcePositions;

            _particleEffect.Validate(parameters.ParticleEffectParameters);
            _soundEffect.Validate(parameters.SoundEffectParameters);

            if (Application.isPlaying)
            {
                RecomputeIndices();
            }
        }
        internal void Validate(WaterScriptGeneratedRipplesModuleParameters parameters)
        {
            MinimumDisturbance = parameters.MinimumDisturbance;
            MaximumDisturbance = parameters.MaximumDisturbance;

            _particleEffect.Validate(parameters.ParticleEffectParameters);
            _soundEffect.Validate(parameters.SoundEffectParameters);
        }