Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

42 wiersze
784 B

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