Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

40 linhas
811 B

  1. using System;
  2. using Tweening.Extensions;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. namespace Tweening
  6. {
  7. public sealed class ShadowAlphaTweenerTrack : TweenerTrack<Shadow, 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.effectColor.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.effectColor.a;
  29. }
  30. else
  31. {
  32. this._component.UpdateColorAlpha(this._from);
  33. }
  34. }
  35. }
  36. }