Table of Contents

Class PerformerFactory

The factory responsible for creating animation performers for the SpriteAnimator

Namespace : SpriteAnimations

Constructors

PerformerFactory(SpriteAnimator)

Creates a new performer factory

public PerformerFactory(SpriteAnimator animator)

Parameters

animator SpriteAnimator

Methods

Fabricate(SpriteAnimation)

Fabricates an AnimationPerformer for the given SpriteAnimation type.

protected AnimationPerformer Fabricate(SpriteAnimation animation)

Parameters

animation SpriteAnimation

The SpriteAnimation to create an AnimationPerformer for.

Returns

AnimationPerformer

The fabricated AnimationPerformer.

Get(SpriteAnimation)

Retrieves the AnimationPerformer for the given SpriteAnimation. If the performer is not found, a new one is created.

public AnimationPerformer Get(SpriteAnimation animation)

Parameters

animation SpriteAnimation

The SpriteAnimation to retrieve the performer for.

Returns

AnimationPerformer

The AnimationPerformer for the given SpriteAnimation.

Get<TAnimator>(SpriteAnimation)

Retrieves an animator of type TAnimator for the specified sprite animation.

public TAnimator Get<TAnimator>(SpriteAnimation animation) where TAnimator : AnimationPerformer

Parameters

animation SpriteAnimation

The sprite animation.

Returns

TAnimator

An animator of type TAnimator.

Type Parameters

TAnimator

The type of the animator.