Exemple #1
0
 private void CreateAnimation()
 {
     if (animationController == null)
     {
         animationController = new AnimationController();
     }
     animationController.ClearAnimations();
     animationController.AddResetAction(() => proxy.SetValue(BlendShapePreset.Blink, 0.0f));
     animationController.AddWait(null, () => BlinkTimeMin + Random.value * (BlinkTimeMax - BlinkTimeMin));
     animationController.AddAnimation(CloseAnimationTime, 0.0f, 1.0f, v => proxy.SetValue(BlendShapePreset.Blink, v));
     animationController.AddWait(ClosingTime);
     animationController.AddAnimation(OpenAnimationTime, 1.0f, 0.0f, v => proxy.SetValue(BlendShapePreset.Blink, v));
 }