Nez.Portable/ECS/Components/Renderables/Sprites/SpriteAnimation.cs
/// <summary>
/// called by SpriteT to calculate the secondsPerFrame and totalDuration based on the loop details and frame count
/// </summary>
/// <returns>The for use.</returns>
called by SpriteT to calculate the secondsPerFrame and totalDuration based on the loop details and frame count
called by SpriteT to calculate the secondsPerFrame and totalDuration based on the loop details and frame count
public void prepareForUse()
        {
            if (!_isDirty)
                return;
            secondsPerFrame = 1f / fps;
            iterationDuration = secondsPerFrame * (float)frames.Count;
            if (loop)
                totalDuration = float.PositiveInfinity;
            else if (pingPong)
                totalDuration = iterationDuration * 2f;
            else
                totalDuration = iterationDuration;
            _isDirty = false;
        }
public void prepareForUse ( ) { if ( ! _isDirty ) return ; secondsPerFrame = 1f / fps ; iterationDuration = secondsPerFrame * ( float ) frames . Count ; if ( loop ) totalDuration = float . PositiveInfinity ; else if ( pingPong ) totalDuration = iterationDuration * 2f ; else totalDuration = iterationDuration ; _isDirty = false ; }
called by SpriteT to calculate the secondsPerFrame and totalDuration based on the loop details and frame count
called by SpriteT to calculate the secondsPerFrame and totalDuration based on the loop details and frame count
The for use.
The for use .