Table of Contents

Class SpriteAnimationComposite

Namespace : SpriteAnimations

Properties

AnimationType

public override AnimationType AnimationType { get; }

Property Value

AnimationType

AntecipationCycle

public Cycle AntecipationCycle { get; set; }

Property Value

Cycle

CoreCycle

public Cycle CoreCycle { get; set; }

Property Value

Cycle

IsLoopableCore

public bool IsLoopableCore { get; set; }

Property Value

bool

PerformerType

public override Type PerformerType { get; }

Property Value

Type

RecoveryCycle

public Cycle RecoveryCycle { get; set; }

Property Value

Cycle

Methods

CalculateFramesCount()

Calculates the total amount of frames in the animation. Depending on the type of animation this can have serious perfomance impacts as it has to evaluate all frames of all the animation cycles.

public override int CalculateFramesCount()

Returns

int

The count of frames.

GenerateCycles()

This must be executed upon the asset creation

public void GenerateCycles()

OnDemand(int, List<Sprite>, List<Sprite>, List<Sprite>)

Creates a SpriteAnimationComposite animation on demand.

public static SpriteAnimationComposite OnDemand(int fps, List<Sprite> antecipationCycle, List<Sprite> coreCycle, List<Sprite> recoveryCycle)

Parameters

fps int

The frames per second of the animation.

antecipationCycle List<Sprite>

The list of sprites for the antecipation cycle.

coreCycle List<Sprite>

The list of sprites for the core cycle.

recoveryCycle List<Sprite>

The list of sprites for the recovery cycle.

Returns

SpriteAnimationComposite

The created SpriteAnimationComposite object.

SetFrameID(CompositeCycle, int, string)

public void SetFrameID(CompositeCycle compositeCycle, int index, string id)

Parameters

compositeCycle CompositeCycle
index int
id string

UseAsTemplate(List<Sprite>, List<Sprite>, List<Sprite>)

Creates a new SpriteAnimationComposite instance using this animation as template.

public SpriteAnimationComposite UseAsTemplate(List<Sprite> antecipationCycle, List<Sprite> coreCycle, List<Sprite> recoveryCycle)

Parameters

antecipationCycle List<Sprite>

The antecipation cycle template.

coreCycle List<Sprite>

The core cycle template.

recoveryCycle List<Sprite>

The recovery cycle template.

Returns

SpriteAnimationComposite

A new SpriteAnimationComposite instance.