Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using UnityEngine;
- [Serializable]
- public class ColorGradient
- {
- public P5.Easing Easing
- {
- get
- {
- if(easeFunc == P5.SmoothStepUnclamped)
- {
- return P5.Easing.SmoothStep;
- }
- if(easeFunc == P5.SmootherStep)
- {
- return P5.Easing.SmootherStep;
- }
- if(easeFunc == P5.Step)
- {
- return P5.Easing.Step;
- }
- return P5.Easing.Lerp;
- }
- set
- {
- switch(value)
- {
- case P5.Easing.SmoothStep:
- easeFunc = P5.SmoothStepUnclamped;
- break;
- case P5.Easing.SmootherStep:
- easeFunc = P5.SmootherStepUnclamped;
- break;
- case P5.Easing.Step:
- easeFunc = P5.Step;
- break;
- default:
- easeFunc = Mathf.LerpUnclamped;
- break;
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment