Skip to content

Animation

Brine2D

Brine2D.Animation Namespace

Classes
AnimationBlendSelector1D Drives a SpriteAnimator by selecting and transitioning between animation clips based on a single continuous float value (e.g., movement speed, health ratio, aim angle).
AnimationBlendSelector1DSnapshot An immutable snapshot of an AnimationBlendSelector1D's runtime state. Capture via CaptureSnapshot() and restore via RestoreSnapshot(AnimationBlendSelector1DSnapshot). Node definitions are not captured.
AnimationBlendSelector2D Drives a SpriteAnimator by selecting an animation clip based on two continuous float parameters (e.g., horizontal and vertical velocity, directional aim angle + speed).
AnimationBlendSelector2DSnapshot An immutable snapshot of an AnimationBlendSelector2D's runtime state. Capture via CaptureSnapshot() and restore via RestoreSnapshot(AnimationBlendSelector2DSnapshot). Node definitions are not captured.
AnimationClip Represents an animation clip with multiple frames.
AnimationClipSnapshot Immutable snapshot of an AnimationClip's mutable runtime configuration. Captures PlaybackMode, RepeatCount, TexturePath, Texture, UserData, and ClipTint. Frame lists and events are not captured; use Clone(string) for a full structural copy.
AnimationLayer An independent animation track that can run alongside the primary AnimatorComponent animator. Each layer owns its own SpriteAnimator and AnimationStateMachine.
AnimationLayerSnapshot An immutable snapshot of an AnimationLayer's runtime configuration. Capture via CaptureSnapshot() and restore via RestoreSnapshot(AnimationLayerSnapshot). Useful for cutscenes or ability-override systems that need to temporarily reconfigure a layer and then cleanly revert it.
AnimationParameters A simple named-parameter store designed as a companion to AnimationStateMachine transition conditions. Removes the need to manually manage boolean flag resets in lambdas.
AnimationParametersSnapshot An immutable snapshot of an AnimationParameters store. Capture via CaptureSnapshot() and restore via RestoreSnapshot(AnimationParametersSnapshot). Useful for cutscenes or ability-override systems that need to temporarily replace the parameter set and then cleanly revert.
AnimationStateMachine Lightweight code-driven animation state machine. Evaluates transitions each frame and calls Play(string, bool) automatically.
AnimationStateMachineSnapshot Immutable snapshot of AnimationStateMachine runtime state. Use with CaptureSnapshot() and RestoreSnapshot(AnimationStateMachineSnapshot) for save/load and rollback systems.
AnimationTransition Represents a single conditional transition between two animation states.
AnimatorComponent ECS component that holds a SpriteAnimator and an AnimationStateMachine for an entity. Add this alongside SpriteComponent and register AnimationSystem in the scene.
AnimatorPlaybackSnapshot Immutable capture of a SpriteAnimator's runtime playback state. Use CapturePlaybackSnapshot() and RestorePlaybackSnapshot(AnimatorPlaybackSnapshot) to save and restore mid-frame position, speed, direction, ping-pong phase, and cross-fade state atomically.
AsepriteClipLoader Loads AnimationClips from Aseprite JSON sprite-sheet exports. Supports both JSON Array and JSON Hash data formats (File → Export Sprite Sheet).
ClipEvent A named callback attached to an AnimationClip at a specific time offset. Fired by SpriteAnimator when playback crosses the event's Time.
ClipEventArgs Contextual data passed to a clip event callback.
SpriteAnimator Animates sprites by playing animation clips.
SpriteFrame Represents a single frame in a sprite animation.
Enums
AnimationLayerBlendMode Controls how an AnimationLayer combines its frame values with the values already written to the SpriteComponent by lower-priority layers.
AnimationLayerMask Controls which SpriteComponent properties an AnimationLayer is allowed to overwrite each frame.
PlaybackMode Controls how an AnimationClip loops.