Beispiel #1
0
 private void UpdateNoise(int keyIndex)
 {
     NoiseParams value = Engine.GetNoise(keyIndex);
     //nslNoiseIntensity.Value = (decimal)value.Intensity;
     //nslNoiseGrain.Value = (decimal)value.Grain;
     //nslNoiseFPS.Value = (decimal)value.FPS;
 }
Beispiel #2
0
        public NoiseParams GetNoise(int keyIndex)
        {
            NoiseParams result = default(NoiseParams);
            float       time;

            using (PostProcessParamBase param = _animator.GetParam(PostProcessParamType.NoiseIntensity))
            {
                time = param.GetKeyTime(keyIndex);
                SafetyGetValue(param, time, ref result.Intensity, 0);
            }
            using (PostProcessParamBase param = _animator.GetParam(PostProcessParamType.NoiseGrain))
            {
                SafetyGetValue(param, time, ref result.Grain, 0);
            }
            using (PostProcessParamBase param = _animator.GetParam(PostProcessParamType.NoiseFps))
            {
                SafetyGetValue(param, time, ref result.FPS, 0);
            }
            return(result);
        }
Beispiel #3
0
        private void UpdateNoise(int keyIndex)
        {
            NoiseParams value = Engine.GetNoise(keyIndex);

            try
            {
                nslNoiseIntensity.Value = (decimal)Convert.ToInt32(value.Intensity.ToString().Split('.', ',')[1]);
            }
            catch
            {
                nslNoiseIntensity.Value = 0;
            }

            try
            {
                nslNoiseGrain.Value = (decimal)Convert.ToInt32(value.Grain.ToString().Split('.', ',')[1]);
            }
            catch
            {
                nslNoiseGrain.Value = 0;
            }

            nslNoiseFPS.Value = (decimal)value.FPS;
        }