C# 클래스 tk2dAnimatedSprite, Malisse

상속: tk2dSprite
파일 보기 프로젝트 열기: Collegiennes/Malisse 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
anim tk2dSpriteAnimation,
animationCompleteDelegate AnimationCompleteDelegate
animationEventDelegate AnimationEventDelegate,
clipId int
createCollider bool
playAutomatically bool

공개 메소드들

메소드 설명
AddComponent ( GameObject go, tk2dSpriteAnimation, anim, int clipId ) : tk2dAnimatedSprite,

Adds a tk2dAnimatedSprite as a component to the gameObject passed in, setting up necessary parameters and building geometry.

GetClipIdByName ( string name ) : int

Resolves an animation clip by name and returns a unique id. This is a convenient alias to tk2dSpriteAnimation.GetClipIdByName

LateUpdate ( ) : void
OnCompleteAnimation ( ) : void
Pause ( ) : void

Pause the currently playing clip. Will do nothing if the clip is currently paused.

Play ( ) : void

Play the active clip. Will restart the clip if called again. Will restart the clip at clipStartTime if called while the clip is playing.

Play ( float clipStartTime ) : void

Play the active clip, starting "clipStartTime" seconds into the clip. Will restart the clip at clipStartTime if called while the clip is playing.

Play ( int id ) : void

Play the clip specified by identifier. Will restart the clip at clipStartTime if called while the clip is playing.

Play ( int clipId, float clipStartTime ) : void

Play the clip specified by identifier. Will restart the clip at clipStartTime if called while the clip is playing.

Play ( string name ) : void

Play the specified clip. Will restart the clip at clipStartTime if called while the clip is playing.

Play ( string name, float clipStartTime ) : void

Play the specified clip, starting "clipStartTime" seconds into the clip. Will restart the clip at clipStartTime if called while the clip is playing.

Play ( tk2dSpriteAnimationClip, clip, float clipStartTime ) : void

Play the clip specified by identifier. Will restart the clip at clipStartTime if called while the clip is playing.

Play ( tk2dSpriteAnimationClip, clip, float clipStartTime, float overrideFps ) : void

Play the clip specified by identifier. Will restart the clip at clipStartTime if called while the clip is playing. No defaults to play nice with default MonoDevelop configuration.

PlayFromFrame ( int frame ) : void

Play the active clip, starting at the frame specified. Will restart the clip at frame if called while the clip is playing.

PlayFromFrame ( int id, int frame ) : void

Play the clip specified by identifier, starting at the specified frame. Will restart the clip at clipStartTime if called while the clip is playing.

PlayFromFrame ( string name, int frame ) : void

Play the specified clip, starting at the frame specified. Will restart the clip at frame if called while the clip is playing.

ProcessEvents ( int start, int last, int direction ) : void
Resume ( ) : void

Resume the currently paused clip. Will do nothing if the clip hasn't been paused.

SetFrame ( int currFrame ) : void

Sets the current frame. The animation will wrap if the selected frame exceeds the number of frames in the clip. This variant WILL trigger an event if the current frame has a trigger defined.

SetFrame ( int currFrame, bool triggerEvent ) : void

Sets the current frame. The animation will wrap if the selected frame exceeds the number of frames in the clip.

SetFrameInternal ( int currFrame ) : void
Stop ( ) : void

Stop the currently playing clip.

StopAndResetFrame ( ) : void

Stops the currently playing animation and reset to the first frame in the animation

WarpClipToLocalTime ( tk2dSpriteAnimationClip, clip, float time ) : void

보호된 메소드들

메소드 설명
NeedBoxCollider ( ) : bool

비공개 메소드들

메소드 설명
Start ( ) : void
isPlaying ( ) : bool

메소드 상세

AddComponent() 공개 정적인 메소드

Adds a tk2dAnimatedSprite as a component to the gameObject passed in, setting up necessary parameters and building geometry.
public static AddComponent ( GameObject go, tk2dSpriteAnimation, anim, int clipId ) : tk2dAnimatedSprite,
go GameObject
anim tk2dSpriteAnimation,
clipId int
리턴 tk2dAnimatedSprite,

GetClipIdByName() 공개 메소드

Resolves an animation clip by name and returns a unique id. This is a convenient alias to tk2dSpriteAnimation.GetClipIdByName
public GetClipIdByName ( string name ) : int
name string Case sensitive clip name, as defined in .
리턴 int

LateUpdate() 공개 메소드

public LateUpdate ( ) : void
리턴 void

NeedBoxCollider() 보호된 메소드

protected NeedBoxCollider ( ) : bool
리턴 bool

OnCompleteAnimation() 공개 메소드

public OnCompleteAnimation ( ) : void
리턴 void

Pause() 공개 메소드

Pause the currently playing clip. Will do nothing if the clip is currently paused.
public Pause ( ) : void
리턴 void

Play() 공개 메소드

Play the active clip. Will restart the clip if called again. Will restart the clip at clipStartTime if called while the clip is playing.
public Play ( ) : void
리턴 void

Play() 공개 메소드

Play the active clip, starting "clipStartTime" seconds into the clip. Will restart the clip at clipStartTime if called while the clip is playing.
public Play ( float clipStartTime ) : void
clipStartTime float
리턴 void

Play() 공개 메소드

Play the clip specified by identifier. Will restart the clip at clipStartTime if called while the clip is playing.
public Play ( int id ) : void
id int /// Use to resolve a named clip id ///
리턴 void

Play() 공개 메소드

Play the clip specified by identifier. Will restart the clip at clipStartTime if called while the clip is playing.
public Play ( int clipId, float clipStartTime ) : void
clipId int
clipStartTime float Clip start time in seconds.
리턴 void

Play() 공개 메소드

Play the specified clip. Will restart the clip at clipStartTime if called while the clip is playing.
public Play ( string name ) : void
name string /// Name of clip. Try to cache the animation clip Id and use that instead for performance. ///
리턴 void

Play() 공개 메소드

Play the specified clip, starting "clipStartTime" seconds into the clip. Will restart the clip at clipStartTime if called while the clip is playing.
public Play ( string name, float clipStartTime ) : void
name string Name of clip. Try to cache the animation clip Id and use that instead for performance.
clipStartTime float Clip start time in seconds.
리턴 void

Play() 공개 메소드

Play the clip specified by identifier. Will restart the clip at clipStartTime if called while the clip is playing.
public Play ( tk2dSpriteAnimationClip, clip, float clipStartTime ) : void
clip tk2dSpriteAnimationClip, The clip to play.
clipStartTime float Clip start time in seconds. A value of DefaultFps will start the clip from the beginning
리턴 void

Play() 공개 메소드

Play the clip specified by identifier. Will restart the clip at clipStartTime if called while the clip is playing. No defaults to play nice with default MonoDevelop configuration.
public Play ( tk2dSpriteAnimationClip, clip, float clipStartTime, float overrideFps ) : void
clip tk2dSpriteAnimationClip, The clip to play.
clipStartTime float Clip start time in seconds. A value of DefaultFps will start the clip from the beginning
overrideFps float Overriden framerate of clip. Set to 0 to use default
리턴 void

PlayFromFrame() 공개 메소드

Play the active clip, starting at the frame specified. Will restart the clip at frame if called while the clip is playing.
public PlayFromFrame ( int frame ) : void
frame int
리턴 void

PlayFromFrame() 공개 메소드

Play the clip specified by identifier, starting at the specified frame. Will restart the clip at clipStartTime if called while the clip is playing.
public PlayFromFrame ( int id, int frame ) : void
id int Use to resolve a named clip id
frame int Frame to start from.
리턴 void

PlayFromFrame() 공개 메소드

Play the specified clip, starting at the frame specified. Will restart the clip at frame if called while the clip is playing.
public PlayFromFrame ( string name, int frame ) : void
name string Name of clip. Try to cache the animation clip Id and use that instead for performance.
frame int Frame to start playing from.
리턴 void

ProcessEvents() 공개 메소드

public ProcessEvents ( int start, int last, int direction ) : void
start int
last int
direction int
리턴 void

Resume() 공개 메소드

Resume the currently paused clip. Will do nothing if the clip hasn't been paused.
public Resume ( ) : void
리턴 void

SetFrame() 공개 메소드

Sets the current frame. The animation will wrap if the selected frame exceeds the number of frames in the clip. This variant WILL trigger an event if the current frame has a trigger defined.
public SetFrame ( int currFrame ) : void
currFrame int
리턴 void

SetFrame() 공개 메소드

Sets the current frame. The animation will wrap if the selected frame exceeds the number of frames in the clip.
public SetFrame ( int currFrame, bool triggerEvent ) : void
currFrame int
triggerEvent bool
리턴 void

SetFrameInternal() 공개 메소드

public SetFrameInternal ( int currFrame ) : void
currFrame int
리턴 void

Stop() 공개 메소드

Stop the currently playing clip.
public Stop ( ) : void
리턴 void

StopAndResetFrame() 공개 메소드

Stops the currently playing animation and reset to the first frame in the animation
public StopAndResetFrame ( ) : void
리턴 void

WarpClipToLocalTime() 공개 메소드

public WarpClipToLocalTime ( tk2dSpriteAnimationClip, clip, float time ) : void
clip tk2dSpriteAnimationClip,
time float
리턴 void

프로퍼티 상세

anim 공개적으로 프로퍼티

tk2dSpriteAnimation
public tk2dSpriteAnimation, anim
리턴 tk2dSpriteAnimation,

animationCompleteDelegate 공개적으로 프로퍼티

Animation complete event. This is called when the animation has completed playing. Will not trigger on looped animations
public AnimationCompleteDelegate animationCompleteDelegate
리턴 AnimationCompleteDelegate

animationEventDelegate 공개적으로 프로퍼티

Animation event. This is called when the frame displayed has tk2dSpriteAnimationFrame.triggerEvent set. The triggering frame is passed to the delegate, and the eventInfo / Int / Float can be extracted from there.
public AnimationEventDelegate, animationEventDelegate
리턴 AnimationEventDelegate,

clipId 공개적으로 프로퍼티

Currently playing/active clip
public int clipId
리턴 int

createCollider 공개적으로 프로퍼티

Interface option to create an animated box collider for this animated sprite
public bool createCollider
리턴 bool

playAutomatically 공개적으로 프로퍼티

Interface option to play the animation automatically when instantiated / game is started. Useful for background looping animations.
public bool playAutomatically
리턴 bool