C# 클래스 Nez.Sprites.SpriteAnimation

houses the information that a SpriteT requires for animation
파일 보기 프로젝트 열기: prime31/Nez 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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