Nez.Portable/ECS/Components/Renderables/Sprites/SpriteTrail.cs
/// <summary>
/// stores the last position for distance calculations and spawns a new trail instance if there is one available in the stack
/// </summary>
stores the last position for distance calculations and spawns a new trail instance if there is one available in the stack
stores the last position for distance calculations and spawns a new trail instance if there is one available in the stack
void spawnInstance()
        {
            _lastPosition = _sprite.entity.transform.position + _sprite.localOffset;
            if (_awaitingDisable || _availableSpriteTrailInstances.Count == 0)
                return;
            var instance = _availableSpriteTrailInstances.Pop();
            instance.spawn(_lastPosition, _sprite.subtexture, fadeDuration, fadeDelay, initialColor, fadeToColor);
            instance.setSpriteRenderOptions(
                _sprite.entity.transform.rotation,
                _sprite.origin,
                _sprite.entity.transform.scale,
                _sprite.spriteEffects,
                layerDepth);
            _liveSpriteTrailInstances.Add(instance);
        }
void spawnInstance ( ) { _lastPosition = _sprite . entity . transform . position + _sprite . localOffset ; if ( _awaitingDisable || _availableSpriteTrailInstances . Count == 0 ) return ; var instance = _availableSpriteTrailInstances . Pop ( ) ; instance . spawn ( _lastPosition , _sprite . subtexture , fadeDuration , fadeDelay , initialColor , fadeToColor ) ; instance . setSpriteRenderOptions ( _sprite . entity . transform . rotation , _sprite . origin , _sprite . entity . transform . scale , _sprite . spriteEffects , layerDepth ) ; _liveSpriteTrailInstances . Add ( instance ) ; }
stores the last position for distance calculations and spawns a new trail instance if there is one available in the stack
stores the last position for distance calculations and spawns a new trail instance if there is one available in the stack