C# Class SuperSprite, urban-survivors

Inheritance: MonoBehaviour
显示文件 Open project: exdev/urban-survivors Class Usage Examples

Public Properties

Property Type Description
animations SuperSpriteAnim[],
defaultAnim int
playDefaultAnimOnStart bool

Protected Properties

Property Type Description
animCompleteDelegate AnimCompleteDelegate
animating bool
curAnim SuperSpriteAnim,
m_started bool

Public Methods

Method Description
DoAnim ( SuperSpriteAnim, anim ) : void

Plays the specified SuperSprite animation, but only if it isn't playing already.

DoAnim ( int index ) : void

Plays the specified SuperSprite animation, but only if it isn't playing already.

DoAnim ( string name ) : void

Plays the specified SuperSprite animation, but only if it isn't playing already.

GetAnim ( int index ) : SuperSpriteAnim,

Returns the SuperSpriteAnim at the specified index.

GetAnim ( string name ) : SuperSpriteAnim,

Returns the SuperSpriteAnim with the specified name.

GetCurAnim ( ) : SuperSpriteAnim,
Hide ( bool tf ) : void

Hides the SuperSprite.

IsAnimating ( ) : bool

Returns whether an animation is playing.

IsHidden ( ) : bool

Returns whether the SuperSprite is hidden.

PauseAnim ( ) : void

Pauses the currently playing animation.

PlayAnim ( SuperSpriteAnim, anim ) : void

Plays the specified SuperSprite animation.

PlayAnim ( int index ) : void

Plays the specified SuperSprite animation.

PlayAnim ( string anim ) : void

Plays the specified SuperSprite animation.

SetAnimCompleteDelegate ( AnimCompleteDelegate del ) : void

Sets the delegate to be called upon animation completion.

Start ( ) : void
StopAnim ( ) : void

Stops the current animation from playing and resets it to the beginning for playing again.

UnpauseAnim ( ) : void

Resumes an animation from where it left off previously.

Protected Methods

Method Description
AnimFinished ( SuperSpriteAnim, anim ) : void

Method Details

AnimFinished() protected method

protected AnimFinished ( SuperSpriteAnim, anim ) : void
anim SuperSpriteAnim,
return void

DoAnim() public method

Plays the specified SuperSprite animation, but only if it isn't playing already.
public DoAnim ( SuperSpriteAnim, anim ) : void
anim SuperSpriteAnim, The SuperSprite animation to be played.
return void

DoAnim() public method

Plays the specified SuperSprite animation, but only if it isn't playing already.
public DoAnim ( int index ) : void
index int The index of the SuperSprite animation to be played.
return void

DoAnim() public method

Plays the specified SuperSprite animation, but only if it isn't playing already.
public DoAnim ( string name ) : void
name string
return void

GetAnim() public method

Returns the SuperSpriteAnim at the specified index.
public GetAnim ( int index ) : SuperSpriteAnim,
index int The index of the desired animation.
return SuperSpriteAnim,

GetAnim() public method

Returns the SuperSpriteAnim with the specified name.
public GetAnim ( string name ) : SuperSpriteAnim,
name string The name of the desired animation.
return SuperSpriteAnim,

GetCurAnim() public method

public GetCurAnim ( ) : SuperSpriteAnim,
return SuperSpriteAnim,

Hide() public method

Hides the SuperSprite.
public Hide ( bool tf ) : void
tf bool
return void

IsAnimating() public method

Returns whether an animation is playing.
public IsAnimating ( ) : bool
return bool

IsHidden() public method

Returns whether the SuperSprite is hidden.
public IsHidden ( ) : bool
return bool

PauseAnim() public method

Pauses the currently playing animation.
public PauseAnim ( ) : void
return void

PlayAnim() public method

Plays the specified SuperSprite animation.
public PlayAnim ( SuperSpriteAnim, anim ) : void
anim SuperSpriteAnim, The SuperSprite animation to be played.
return void

PlayAnim() public method

Plays the specified SuperSprite animation.
public PlayAnim ( int index ) : void
index int The index of the SuperSprite animation to be played.
return void

PlayAnim() public method

Plays the specified SuperSprite animation.
public PlayAnim ( string anim ) : void
anim string The name of the SuperSprite animation to be played.
return void

SetAnimCompleteDelegate() public method

Sets the delegate to be called upon animation completion.
public SetAnimCompleteDelegate ( AnimCompleteDelegate del ) : void
del AnimCompleteDelegate The delegate to be called when an animation finishes playing.
return void

Start() public method

public Start ( ) : void
return void

StopAnim() public method

Stops the current animation from playing and resets it to the beginning for playing again.
public StopAnim ( ) : void
return void

UnpauseAnim() public method

Resumes an animation from where it left off previously.
public UnpauseAnim ( ) : void
return void

Property Details

animCompleteDelegate protected_oe property

protected AnimCompleteDelegate animCompleteDelegate
return AnimCompleteDelegate

animating protected_oe property

protected bool animating
return bool

animations public_oe property

The animations that comprise this SuperSprite.
public SuperSpriteAnim[], animations
return SuperSpriteAnim[],

curAnim protected_oe property

protected SuperSpriteAnim, curAnim
return SuperSpriteAnim,

defaultAnim public_oe property

The default animation.
public int defaultAnim
return int

m_started protected_oe property

protected bool m_started
return bool

playDefaultAnimOnStart public_oe property

Whether or not to play the default animation when the object is started.
public bool playDefaultAnimOnStart
return bool