Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

40 lignes
797 B

  1. using System;
  2. using Tweening.Extensions;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. namespace Tweening
  6. {
  7. public sealed class ImageAlphaTweenerTrack : TweenerTrack<Image, float>
  8. {
  9. public override void UpdateComponentValue(float evaluatedTime)
  10. {
  11. this._component.UpdateColorAlpha(Mathf.LerpUnclamped(this._from, this._to, evaluatedTime));
  12. }
  13. public override void ResetComponentValue()
  14. {
  15. if (this._dynamicFrom)
  16. {
  17. this._from = this._component.color.a;
  18. }
  19. else
  20. {
  21. this._component.UpdateColorAlpha(this._from);
  22. }
  23. }
  24. public override void InitializeComponentValue()
  25. {
  26. if (this._dynamicFrom)
  27. {
  28. this._from = this._component.color.a;
  29. }
  30. else
  31. {
  32. this._component.UpdateColorAlpha(this._from);
  33. }
  34. }
  35. }
  36. }