Ejemplo n.º 1
0
        public void Step(float dt)
        {
            if (_render.IsValid)
            {
                _render.UpdateProperties(_requiredUpdate >= UpdateType.Rebuild);
            }
            else
            {
                Log.Debug("Stepped, but render handle was not valid");
            }

            _requiredUpdate = UpdateType.None;
        }
Ejemplo n.º 2
0
            public void Step(float dt)
            {
                // Calculate saturation (modulated by change over lifetime if that's enabled)
                var saturation = _splatters.Core.Saturation;

                if (_splatters.Lifetime.Enabled)
                {
                    _remainingLifetime -= dt * AgeingRate;
                    saturation         *= _splatters.Lifetime.Saturation.Evaluate((_totalLifetime - _remainingLifetime) / _totalLifetime);
                }

                if (_settingsDirty > 0 || Math.Abs(_settings.SaturationMultiplier - saturation) > float.Epsilon)
                {
                    _settings.SaturationMultiplier = saturation;
                    _render.UpdateProperties(_settingsDirty > 1);
                    _settingsDirty = 0;
                }
            }