Tutorial5.cs 349 B

1234567891011121314
  1. using System;
  2. using UnityEngine;
  3. public class Tutorial5 : MonoBehaviour
  4. {
  5. public void SetDurationToCurrentProgress()
  6. {
  7. UITweener[] componentsInChildren = base.GetComponentsInChildren<UITweener>();
  8. foreach (UITweener uitweener in componentsInChildren)
  9. {
  10. uitweener.duration = Mathf.Lerp(2f, 0.5f, UIProgressBar.current.value);
  11. }
  12. }
  13. }