Esempio n. 1
0
        internal void Validate(WaterSimulationModuleParameters parameters)
        {
            Damping   = parameters.Damping;
            Stiffness = parameters.Stiffness;
            Spread    = parameters.Spread;
            bool recomputeMesh = parameters.FirstCustomBoundary != FirstCustomBoundary || parameters.SecondCustomBoundary != SecondCustomBoundary;

            FirstCustomBoundary     = parameters.FirstCustomBoundary;
            SecondCustomBoundary    = parameters.SecondCustomBoundary;
            IsUsingCustomBoundaries = parameters.IsUsingCustomBoundaries;
            if (recomputeMesh)
            {
                _meshModule.RecomputeMeshData();
            }
        }
        internal void Validate(float damping, float stiffness, float spread, float firstCustomBoundary, float secondCustomBoundary, bool useCustomBoundaries)
        {
            Damping   = damping;
            Stiffness = stiffness;
            Spread    = spread;
            bool recomputeMesh = firstCustomBoundary != FirstCustomBoundary || secondCustomBoundary != SecondCustomBoundary;

            FirstCustomBoundary     = firstCustomBoundary;
            SecondCustomBoundary    = secondCustomBoundary;
            IsUsingCustomBoundaries = useCustomBoundaries;
            if (recomputeMesh)
            {
                _meshModule.RecomputeMeshData();
            }
        }
        internal void Validate(WaterSimulationModuleParameters parameters)
        {
            bool recomputeMesh = parameters.FirstCustomBoundary != FirstCustomBoundary || parameters.SecondCustomBoundary != SecondCustomBoundary;

            Damping                        = parameters.Damping;
            Stiffness                      = parameters.Stiffness;
            Spread                         = parameters.Spread;
            FirstCustomBoundary            = parameters.FirstCustomBoundary;
            SecondCustomBoundary           = parameters.SecondCustomBoundary;
            IsUsingCustomBoundaries        = parameters.IsUsingCustomBoundaries;
            MaximumDynamicWavesDisturbance = parameters.MaximumDynamicWavesDisturbance;
            LimitDynamicWavesDisturbance   = parameters.LimitDynamicWavesDisturbance;
            AreSineWavesActive             = parameters.AreSineWavesActive;
            SineWavesParameters            = parameters.SineWavesParameters;
            CanWavesAffectRigidbodies      = parameters.CanWavesAffectRigidbodies;
            WavesStrengthOnRigidbodies     = parameters.WavesStrengthOnRigidbodies;

            if (recomputeMesh)
            {
                _meshModule.RecomputeMeshData();
            }
        }