C# Class SuperSpriteAnim, urban-survivors

Mostra file Open project: exdev/urban-survivors Class Usage Examples

Public Properties

Property Type Description
deactivateNonPlaying bool
deactivateRecursively bool
loopCycles int
name string
onAnimEnd ANIM_END_ACTION
pingPong bool
spriteAnims SuperSpriteAnimElement[],

Protected Properties

Property Type Description
curAnim int
isRunning bool
numLoops int
stepDir int

Public Methods

Method Description
AnimFinished ( SpriteBase, sp ) : void
Delete ( ) : void

Calls Delete() on each constituent sprite.

Hide ( bool tf ) : void

Hides the sprite of the current animation.

Init ( int idx, AnimCompletedDelegate del ) : void
IsHidden ( ) : bool

Returns whether the current sprite in this animation is hidden:

Pause ( ) : void

Pauses the animation.

Play ( ) : void

Starts the animation to playing.

Reset ( ) : void

Resets the animation to the beginning.

Stop ( ) : void

Stops the animation playing.

Unpause ( ) : void

Unpauses the animation.

Protected Methods

Method Description
HideSprite ( SpriteBase, sp, bool tf ) : void

Method Details

AnimFinished() public method

public AnimFinished ( SpriteBase, sp ) : void
sp SpriteBase,
return void

Delete() public method

Calls Delete() on each constituent sprite.
public Delete ( ) : void
return void

Hide() public method

Hides the sprite of the current animation.
public Hide ( bool tf ) : void
tf bool Whether to hide the animation.
return void

HideSprite() protected method

protected HideSprite ( SpriteBase, sp, bool tf ) : void
sp SpriteBase,
tf bool
return void

Init() public method

public Init ( int idx, AnimCompletedDelegate del ) : void
idx int
del AnimCompletedDelegate
return void

IsHidden() public method

Returns whether the current sprite in this animation is hidden:
public IsHidden ( ) : bool
return bool

Pause() public method

Pauses the animation.
public Pause ( ) : void
return void

Play() public method

Starts the animation to playing.
public Play ( ) : void
return void

Reset() public method

Resets the animation to the beginning.
public Reset ( ) : void
return void

Stop() public method

Stops the animation playing.
public Stop ( ) : void
return void

Unpause() public method

Unpauses the animation.
public Unpause ( ) : void
return void

Property Details

curAnim protected_oe property

protected int curAnim
return int

deactivateNonPlaying public_oe property

When set to true, non-playing sprites' GameObjects will be deactivated and not merely hidden.
public bool deactivateNonPlaying
return bool

deactivateRecursively public_oe property

When set to true, non-playing sprites' GameObjecs will be deactivated recursively. NOTE: Only has effect if deactivateNonPlaying is set to true.
public bool deactivateRecursively
return bool

isRunning protected_oe property

protected bool isRunning
return bool

loopCycles public_oe property

How many times to loop the animation, IN ADDITION to the initial play-through. 0 indicates to place the animation once then stop. 1 indicates to repeat the animation once before stopping, and so on.
public int loopCycles
return int

name public_oe property

Name of the animation.
public string name
return string

numLoops protected_oe property

protected int numLoops
return int

onAnimEnd public_oe property

What the SuperSprite should do when the animation is done playing.
public ANIM_END_ACTION onAnimEnd
return ANIM_END_ACTION

pingPong public_oe property

Reverse the play direction when the end of the animation is reached? (Ping-pong) If true, a loop iteration isn't counted until the animation returns to the beginning. NOTE: This automatically plays the constituent animations in reverse when going back through the animation list, so keep that in mind when creating your individual sprite animations.
public bool pingPong
return bool

spriteAnims public_oe property

The actual sprite animations to use.
public SuperSpriteAnimElement[], spriteAnims
return SuperSpriteAnimElement[],

stepDir protected_oe property

protected int stepDir
return int