public override void OnStart() { if (Property == "Enabled") // special case for boolean, we randomize it { ApplyProperty(RobustRandom.NextDouble() < 0.5 ? true : false); return; } if (InterpolateMode == AnimationInterpolationMode.Cubic) { _randomValue1 = _randomValue2; _randomValue2 = _randomValue3; } _randomValue3 = _randomValue4; _randomValue4 = InterpolateLinear(StartValue, EndValue, (float)RobustRandom.NextDouble()); }
public override void OnInitialize() { _randomValue2 = InterpolateLinear(StartValue, EndValue, (float)RobustRandom.NextDouble()); _randomValue3 = InterpolateLinear(StartValue, EndValue, (float)RobustRandom.NextDouble()); _randomValue4 = InterpolateLinear(StartValue, EndValue, (float)RobustRandom.NextDouble()); }