コード例 #1
0
        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());
        }
コード例 #2
0
 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());
 }