Skip to content

AnimationSystem.CollectCrossFadeGhost(SpriteComponent, SpriteAnimator, AnimationLayerMask) Method

Definition

Namespace: Brine2D.Systems.Animation

Builds the ghost entry for any active cross-fade on animator and returns this fader's contribution to the composed incoming-alpha: baseAlpha * crossFadeAlpha when a fade is active, or 1f when no fade is in progress.

private static float CollectCrossFadeGhost(Brine2D.Systems.Rendering.SpriteComponent sprite, Brine2D.Animation.SpriteAnimator animator, Brine2D.Animation.AnimationLayerMask mask);

Parameters

sprite SpriteComponent

animator SpriteAnimator

mask AnimationLayerMask

Returns

System.Single

Remarks

When the layer mask does not include Brine2D.Animation.AnimationLayerMask.SourceRect (e.g. a tint-only layer), the ghost falls back to SourceRect so that tint cross-fades render correctly even without a frame rect from the layer.