Nez.Portable/Graphics/Transitions/SceneTransition.cs
/// <summary>
/// the most common type of transition seems to be one that ticks progress from 0 - 1. This method takes care of that for you
/// if your transition needs to have a _progress property ticked after the scene loads.
/// </summary>
/// <param name="duration">duration</param>
/// <param name="reverseDirection">if true, _progress will go from 1 to 0. If false, it goes form 0 to 1</param>
the most common type of transition seems to be one that ticks progress from 0 - 1. This method takes care of that for you
if your transition needs to have a _progress property ticked after the scene loads.
the most common type of transition seems to be one that ticks progress from 0 - 1 . This method takes care of that for you if your transition needs to have a _progress property ticked after the scene loads .
public IEnumerator tickEffectProgressProperty(
            Effect effect,
            float duration,
            EaseType easeType = EaseType.ExpoOut,
            bool reverseDirection = false)
        {
            var start = reverseDirection ? 1f : 0f;
            var end = reverseDirection ? 0f : 1f;
            var progressParam = effect.Parameters["_progress"];
            var elapsed = 0f;
            while (elapsed < duration)
            {
                elapsed += Time.deltaTime;
                var step = Lerps.ease(easeType, start, end, elapsed, duration);
                progressParam.SetValue(step);
                yield return null;
            }
        }
public IEnumerator tickEffectProgressProperty ( Effect effect , float duration , EaseType easeType = EaseType . ExpoOut , bool reverseDirection = false ) { var start = reverseDirection ? 1f : 0f ; var end = reverseDirection ? 0f : 1f ; var progressParam = effect . Parameters [ " " ] ; var elapsed = 0f ; while ( elapsed < duration ) { elapsed += Time . deltaTime ; var step = Lerps . ease ( easeType , start , end , elapsed , duration ) ; progressParam . SetValue ( step ) ; yield return null ; } }
the most common type of transition seems to be one that ticks progress from 0 - 1.
the most common type of transition seems to be one that ticks progress from 0 - 1 .
effect
Effect
duration
float
None
easeType
EaseType
reverseDirection
bool
if true, _progress will go from 1 to 0. If false, it goes form 0 to 1
if true _progress will go from 1 to 0 . If false it goes form 0 to 1