コード例 #1
0
 public AudioSourceFader(AudioSource source)
 {
     this.source     = source;
     timerFade       = new Timer(1.0f, null, false, true);
     timerBeforeFade = new Timer(1.0f, TimerBeforeFadeFinished, false, true);
     interpolator    = new InterpolateFromCurrent <float>(Mathf.Lerp, timerFade,
                                                          SetVolume, GetVolume);
 }
コード例 #2
0
 // Call this method in derived classes.
 public void SetInterpolateFunction(InterpolateFromCurrent <TValue> .InterpolateHandler fn)
 {
     interpolator.SetInterpolateFunction(fn);
 }
コード例 #3
0
 private void Awake()
 {
     interpolator = new InterpolateFromCurrent <TValue>(null, timer,
                                                        accessor.Set, accessor.Get);
 }