float GetInterpolation(float t, LerpInterpolationType type) { switch (type) { case LerpInterpolationType.Quadratic: return(t * t); case LerpInterpolationType.EaseIn: return(1f - Mathf.Cos(t * Mathf.PI * 0.5f)); case LerpInterpolationType.EaseOut: return(Mathf.Sin(t * Mathf.PI * 0.5f)); case LerpInterpolationType.Smoothstep: return(t * t * (3f - 2f * t)); case LerpInterpolationType.Smootherstep: return(t * t * t * (t * (6f * t - 15f) + 10f)); case LerpInterpolationType.DeltaTime: return(Time.deltaTime * t); } return(t); }
public override void Reset() { fromFloat = new FsmFloat { UseVariable = true }; toFloat = new FsmFloat { UseVariable = true }; interpolation = LerpInterpolationType.Linear; storeResult = null; everyFrame = true; }
public override void Reset() { gameObject = null; distance = 1f; snappyness = 5f; updateTypeSelect = updateType.LateUpdate; interpolation = LerpInterpolationType.Linear; sensitivity = 30; lerpOn = true; everyFrame = true; orthoSizeMin = 1f; orthoSizeMax = 100f; cameraBufferX = 15f; cameraBufferY = 15f; }
public override void Reset() { fromFloat = new FsmFloat { UseVariable = true }; toFloat = new FsmFloat { UseVariable = true }; interpolation = LerpInterpolationType.Linear; storeResult = null; everyFrame = true; updateType = PlayMakerActionsUtils.EveryFrameUpdateSelector.OnUpdate; }
public override void Reset() { gameObject = null; distance = 1f; upDistance = 1f; snappyness = 5f; charA = null; charB = null; updateTypeSelect = updateType.LateUpdate; everyFrame = true; direction = new Vector3(0, 1, 0); interpolation = LerpInterpolationType.Off; sensitivity = 30; positionObjectbool = false; lerpOn = true; }
float GetInterpolation(float t, LerpInterpolationType type) { switch (type) { case LerpInterpolationType.Quadratic: lerpOn.Value = true; return(Time.timeSinceLevelLoad * snappyness.Value); case LerpInterpolationType.EaseIn: lerpOn.Value = true; return(1f - Mathf.Cos(t * Mathf.PI * 0.5f)); case LerpInterpolationType.EaseOut: lerpOn.Value = true; return(Mathf.Sin(t * Mathf.PI * 0.5f)); case LerpInterpolationType.Smoothstep: lerpOn.Value = true; return(t * t * (3f - 2f * t)); case LerpInterpolationType.Smootherstep: lerpOn.Value = true; return(t * t * t * (t * (6f * t - 15f) + 10f)); case LerpInterpolationType.DeltaTime: lerpOn.Value = true; return(Time.deltaTime * t); case LerpInterpolationType.SimpleSine: lerpOn.Value = true; return(t * Mathf.Sin(Time.timeSinceLevelLoad)); case LerpInterpolationType.DoubleSine: lerpOn.Value = true; return(t * Mathf.Sin(Time.timeSinceLevelLoad / distance.Value)); case LerpInterpolationType.DoubleByHalfSine: lerpOn.Value = true; return(t * (1.5f * Mathf.Sin(Time.timeSinceLevelLoad * distance.Value))); case LerpInterpolationType.Off: lerpOn.Value = false; return(t); } return(t); }
float GetInterpolation(float t,LerpInterpolationType type) { switch(type) { case LerpInterpolationType.Quadratic: return t*t; case LerpInterpolationType.EaseIn: return 1f - Mathf.Cos(t * Mathf.PI * 0.5f); case LerpInterpolationType.EaseOut: return Mathf.Sin(t * Mathf.PI * 0.5f); case LerpInterpolationType.Smoothstep: return t*t * (3f - 2f*t); case LerpInterpolationType.Smootherstep: return t*t*t * (t * (6f*t - 15f) + 10f); case LerpInterpolationType.DeltaTime: return Time.deltaTime*t; } return t; }
float GetInterpolation(float t, LerpInterpolationType type) { switch (type) { case LerpInterpolationType.EaseIn: animationCurvebool = false; return(1f - Mathf.Cos(Time.timeSinceLevelLoad * Mathf.PI * speed.Value)); case LerpInterpolationType.EaseOut: animationCurvebool = false; return(Mathf.Sin(Time.timeSinceLevelLoad * Mathf.PI * speed.Value)); case LerpInterpolationType.Smoothstep: animationCurvebool = false; return(a * a * (3f - 2f * Time.timeSinceLevelLoad)); case LerpInterpolationType.SimpleSine: animationCurvebool = false; return(a * Mathf.Sin(Time.timeSinceLevelLoad)); case LerpInterpolationType.DoubleSine: animationCurvebool = false; return(a * Mathf.Sin(Time.timeSinceLevelLoad / setTime.Value)); case LerpInterpolationType.DoubleByHalfSine: animationCurvebool = false; return(a * (1.5f * Mathf.Sin(Time.timeSinceLevelLoad * setTime.Value))); case LerpInterpolationType.OtherSimpleSine: animationCurvebool = false; return(a * Mathf.Sin((Time.timeSinceLevelLoad * speed.Value) * a)); case LerpInterpolationType.Curve: animationCurvebool = true; return(t); } return(t); }