Show / Hide Table of Contents

Class SpriteAnimation

Animation made out of a list of retro sprites.

Inheritance
System.Object
UnityEngine.Object
UnityEngine.ScriptableObject
SpriteAnimation
Namespace: InsaneScatterbrain.RetroKit.Editor
Syntax
public class SpriteAnimation : ScriptableObject

Properties

Clip

Gets a Unity animation clip, containing the required data for this animation.

Declaration
public AnimationClip Clip { get; }
Property Value
Type Description
UnityEngine.AnimationClip

RetroSprites

Gets the retro sprites that make up this animation.

Declaration
public IList<RetroSprite> RetroSprites { get; }
Property Value
Type Description
System.Collections.Generic.IList<RetroSprite>

Methods

AddFrame(RetroSprite)

Adds a new frame to the animation.

Declaration
public void AddFrame(RetroSprite frame)
Parameters
Type Name Description
RetroSprite frame

The frame.

Create(String)

Creates a new sprite animation and initializes it.

Declaration
public static SpriteAnimation Create(string name)
Parameters
Type Name Description
System.String name

The name.

Returns
Type Description
SpriteAnimation

The sprite animation.

GenerateClip()

Declaration
public AnimationClip GenerateClip()
Returns
Type Description
UnityEngine.AnimationClip

RemoveFrame(RetroSprite)

Removes the given frame from the animation.

Declaration
public void RemoveFrame(RetroSprite frame)
Parameters
Type Name Description
RetroSprite frame

The frame to remove.

RemoveFrame(Int32)

Removes a frame at the given index.

Declaration
public void RemoveFrame(int frameIndex)
Parameters
Type Name Description
System.Int32 frameIndex

The frame index to remove.

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
UnityEngine.Object.ToString()
Back to top Generated by DocFX