Guest User

Untitled

a guest
Jan 23rd, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. [Serializable]
  6. public class ColorGradient
  7. {
  8. public P5.Easing Easing
  9. {
  10. get
  11. {
  12. if(easeFunc == P5.SmoothStepUnclamped)
  13. {
  14. return P5.Easing.SmoothStep;
  15. }
  16. if(easeFunc == P5.SmootherStep)
  17. {
  18. return P5.Easing.SmootherStep;
  19. }
  20. if(easeFunc == P5.Step)
  21. {
  22. return P5.Easing.Step;
  23. }
  24. return P5.Easing.Lerp;
  25. }
  26.  
  27. set
  28. {
  29. switch(value)
  30. {
  31. case P5.Easing.SmoothStep:
  32. easeFunc = P5.SmoothStepUnclamped;
  33. break;
  34. case P5.Easing.SmootherStep:
  35. easeFunc = P5.SmootherStepUnclamped;
  36. break;
  37. case P5.Easing.Step:
  38. easeFunc = P5.Step;
  39. break;
  40. default:
  41. easeFunc = Mathf.LerpUnclamped;
  42. break;
  43. }
  44. }
  45. }
  46. }
Add Comment
Please, Sign In to add comment