C# Класс Nez.Sprites.SpriteAnimation

houses the information that a SpriteT requires for animation
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
completionBehavior AnimationCompletionBehavior
delay float
frames List
totalDuration float

Открытые методы

Метод Описание
SpriteAnimation ( ) : System.Collections.Generic
SpriteAnimation ( List frames ) : System.Collections.Generic
SpriteAnimation ( Subtexture frame ) : System.Collections.Generic
addFrame ( Subtexture subtexture ) : SpriteAnimation

adds a frame to this animation

addFrames ( List subtextures ) : SpriteAnimation

adds multiple frames to this animation

prepareForUse ( ) : void

called by SpriteT to calculate the secondsPerFrame and totalDuration based on the loop details and frame count

setFps ( float fps ) : SpriteAnimation
setLoop ( bool loop ) : SpriteAnimation
setOrigin ( Vector2 origin ) : SpriteAnimation

sets the origin for all frames in this animation

setPingPong ( bool pingPong ) : SpriteAnimation

Описание методов

SpriteAnimation() публичный Метод

public SpriteAnimation ( ) : System.Collections.Generic
Результат System.Collections.Generic

SpriteAnimation() публичный Метод

public SpriteAnimation ( List frames ) : System.Collections.Generic
frames List
Результат System.Collections.Generic

SpriteAnimation() публичный Метод

public SpriteAnimation ( Subtexture frame ) : System.Collections.Generic
frame Nez.Textures.Subtexture
Результат System.Collections.Generic

addFrame() публичный Метод

adds a frame to this animation
public addFrame ( Subtexture subtexture ) : SpriteAnimation
subtexture Nez.Textures.Subtexture Subtexture.
Результат SpriteAnimation

addFrames() публичный Метод

adds multiple frames to this animation
public addFrames ( List subtextures ) : SpriteAnimation
subtextures List Subtextures.
Результат SpriteAnimation

prepareForUse() публичный Метод

called by SpriteT to calculate the secondsPerFrame and totalDuration based on the loop details and frame count
public prepareForUse ( ) : void
Результат void

setFps() публичный Метод

public setFps ( float fps ) : SpriteAnimation
fps float
Результат SpriteAnimation

setLoop() публичный Метод

public setLoop ( bool loop ) : SpriteAnimation
loop bool
Результат SpriteAnimation

setOrigin() публичный Метод

sets the origin for all frames in this animation
public setOrigin ( Vector2 origin ) : SpriteAnimation
origin Microsoft.Xna.Framework.Vector2
Результат SpriteAnimation

setPingPong() публичный Метод

public setPingPong ( bool pingPong ) : SpriteAnimation
pingPong bool
Результат SpriteAnimation

Описание свойств

completionBehavior публичное свойство

public AnimationCompletionBehavior completionBehavior
Результат AnimationCompletionBehavior

delay публичное свойство

public float delay
Результат float

frames публичное свойство

public List frames
Результат List

totalDuration публичное свойство

public float totalDuration
Результат float