C# 클래스 UVAnimation_Multi, urban-survivors

파일 보기 프로젝트 열기: exdev/urban-survivors 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
clips UVAnimation_Auto[],
framerate float
loopCycles int
loopReverse bool
name string
onAnimEnd UVAnimation.ANIM_END_ACTION

보호된 프로퍼티들

프로퍼티 타입 설명
curClip int
duration float
framePos int
i int
numLoops int
ret bool
stepDir int

공개 메소드들

메소드 설명
AppendAnim ( int index, SPRITE_FRAME anim ) : void

Appends UV animation to the clip specified by index.

AppendClip ( UVAnimation, clip ) : void

Appends UV animation clip to the end of the animation sequence.

BuildUVAnim ( SpriteRoot, s ) : UVAnimation_Auto[],

Builds the UV animations for all animation clips that are a part of this animation sequence.

Clone ( ) : UVAnimation_Multi,
GetCurPosition ( ) : int

Returns the (zero-based) frame number of the current position in the over all animation. Example: If the multi contains a total of 100 frames and 25 frames have played so far, then 24 will be returned (because it is zero-based). If the multi is playing backwards, this number will count down from 100 as well.

GetCurrentClip ( ) : UVAnimation_Auto,

Gets a reference to the currently-playing clip.

GetCurrentFrame ( ) : SPRITE_FRAME

Returns the SPRITE_FRAME of the current frame without advancing to the next frame.

GetDuration ( ) : float

Returns the duration, in seconds, of the animation. NOTE: This takes into account loop cycles and loop reverse. Ex: If an animation has a framerate of 30fps, consists of 60 frames, and is set to loop once, the duration will be 4 seconds.

GetFrameCount ( ) : int

Returns the total number of frames displayed by this animation.

GetNextFrame ( SPRITE_FRAME &nextFrame ) : bool
PlayInReverse ( ) : void
Reset ( ) : void

Resets the animation sequence for playing anew.

SetAnim ( int index, SPRITE_FRAME frames ) : void

Replaces the contents of the specified clip.

SetAnimPosition ( float pos ) : void

Sets the current playing position of the animation. NOTE: This method does NOT take loop cycles and loop reversing into account. To set the position taking loop cycles and loop reversing into account, use SetPosition().

SetPosition ( float pos ) : void

Sets the current playing position of the animation. NOTE: This method takes loop cycles and loop reversing into account. To set the position without regard to loop cycles or loop reversing, use SetAnimPosition().

UVAnimation_Multi ( ) : UnityEngine
UVAnimation_Multi ( UVAnimation_Multi, anim ) : UnityEngine

보호된 메소드들

메소드 설명
CalcDuration ( ) : void

메소드 상세

AppendAnim() 공개 메소드

Appends UV animation to the clip specified by index.
public AppendAnim ( int index, SPRITE_FRAME anim ) : void
index int The animation clip to append to.
anim SPRITE_FRAME Array of ANIM_FRAMEs that define the animation to be appended.
리턴 void

AppendClip() 공개 메소드

Appends UV animation clip to the end of the animation sequence.
public AppendClip ( UVAnimation, clip ) : void
clip UVAnimation, Animation clip to append.
리턴 void

BuildUVAnim() 공개 메소드

Builds the UV animations for all animation clips that are a part of this animation sequence.
public BuildUVAnim ( SpriteRoot, s ) : UVAnimation_Auto[],
s SpriteRoot, The sprite for which to build the animation.
리턴 UVAnimation_Auto[],

CalcDuration() 보호된 메소드

protected CalcDuration ( ) : void
리턴 void

Clone() 공개 메소드

public Clone ( ) : UVAnimation_Multi,
리턴 UVAnimation_Multi,

GetCurPosition() 공개 메소드

Returns the (zero-based) frame number of the current position in the over all animation. Example: If the multi contains a total of 100 frames and 25 frames have played so far, then 24 will be returned (because it is zero-based). If the multi is playing backwards, this number will count down from 100 as well.
public GetCurPosition ( ) : int
리턴 int

GetCurrentClip() 공개 메소드

Gets a reference to the currently-playing clip.
public GetCurrentClip ( ) : UVAnimation_Auto,
리턴 UVAnimation_Auto,

GetCurrentFrame() 공개 메소드

Returns the SPRITE_FRAME of the current frame without advancing to the next frame.
public GetCurrentFrame ( ) : SPRITE_FRAME
리턴 SPRITE_FRAME

GetDuration() 공개 메소드

Returns the duration, in seconds, of the animation. NOTE: This takes into account loop cycles and loop reverse. Ex: If an animation has a framerate of 30fps, consists of 60 frames, and is set to loop once, the duration will be 4 seconds.
public GetDuration ( ) : float
리턴 float

GetFrameCount() 공개 메소드

Returns the total number of frames displayed by this animation.
public GetFrameCount ( ) : int
리턴 int

GetNextFrame() 공개 메소드

public GetNextFrame ( SPRITE_FRAME &nextFrame ) : bool
nextFrame SPRITE_FRAME
리턴 bool

PlayInReverse() 공개 메소드

public PlayInReverse ( ) : void
리턴 void

Reset() 공개 메소드

Resets the animation sequence for playing anew.
public Reset ( ) : void
리턴 void

SetAnim() 공개 메소드

Replaces the contents of the specified clip.
public SetAnim ( int index, SPRITE_FRAME frames ) : void
index int Index of the clip the contents of which you wish to replace.
frames SPRITE_FRAME Array of ANIM_FRAMEs that define the content of an animation clip.
리턴 void

SetAnimPosition() 공개 메소드

Sets the current playing position of the animation. NOTE: This method does NOT take loop cycles and loop reversing into account. To set the position taking loop cycles and loop reversing into account, use SetPosition().
public SetAnimPosition ( float pos ) : void
pos float Desired position in the animation (0-1).
리턴 void

SetPosition() 공개 메소드

Sets the current playing position of the animation. NOTE: This method takes loop cycles and loop reversing into account. To set the position without regard to loop cycles or loop reversing, use SetAnimPosition().
public SetPosition ( float pos ) : void
pos float Desired position in the animation (0-1).
리턴 void

UVAnimation_Multi() 공개 메소드

public UVAnimation_Multi ( ) : UnityEngine
리턴 UnityEngine

UVAnimation_Multi() 공개 메소드

public UVAnimation_Multi ( UVAnimation_Multi, anim ) : UnityEngine
anim UVAnimation_Multi,
리턴 UnityEngine

프로퍼티 상세

clips 공개적으로 프로퍼티

The actual sprite animation clips that make up the animation sequence.
public UVAnimation_Auto[], clips
리턴 UVAnimation_Auto[],

curClip 보호되어 있는 프로퍼티

protected int curClip
리턴 int

duration 보호되어 있는 프로퍼티

protected float duration
리턴 float

framePos 보호되어 있는 프로퍼티

protected int framePos
리턴 int

framerate 공개적으로 프로퍼티

The rate in frames per second at which to play the animation.
public float framerate
리턴 float

i 보호되어 있는 프로퍼티

protected int i
리턴 int

loopCycles 공개적으로 프로퍼티

How many times to loop the animation IN ADDITION TO the initial play-through. (-1 to loop infinitely, 0 not to loop at all, 1 to repeat once before stopping, etc.)
public int loopCycles
리턴 int

loopReverse 공개적으로 프로퍼티

Reverse the play direction when the end of the animation is reached? If true, a loop iteration isn't counted until the animation returns to the beginning.
public bool loopReverse
리턴 bool

name 공개적으로 프로퍼티

The name of the animation sequence
public string name
리턴 string

numLoops 보호되어 있는 프로퍼티

protected int numLoops
리턴 int

onAnimEnd 공개적으로 프로퍼티

What the sprite should do when the animation is done playing. The options are to: 1) Do nothing, 2) return to the static image, 3) play the default animation.
public UVAnimation.ANIM_END_ACTION onAnimEnd
리턴 UVAnimation.ANIM_END_ACTION

ret 보호되어 있는 프로퍼티

protected bool ret
리턴 bool

stepDir 보호되어 있는 프로퍼티

protected int stepDir
리턴 int