Skip to content

AnimationClip.FromAtlasRegions(string, IReadOnlyList, float, PlaybackMode) Method

Definition

Namespace: Brine2D.Animation

Creates an animation clip from a sequence of AtlasRegions. Each region becomes one frame; the frame's Texture is set to the region's AtlasTexture and SourceRect is set to the region's SourceRect.

public static Brine2D.Animation.AnimationClip FromAtlasRegions(string name, System.Collections.Generic.IReadOnlyList<Brine2D.Rendering.TextureAtlas.AtlasRegion> regions, float frameDuration=0.1f, Brine2D.Animation.PlaybackMode playbackMode=Brine2D.Animation.PlaybackMode.Loop);

Parameters

name System.String

regions System.Collections.Generic.IReadOnlyList<AtlasRegion>

frameDuration System.Single

playbackMode PlaybackMode

Returns

AnimationClip