C# Класс SuperSprite, urban-survivors

Наследование: MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
animations SuperSpriteAnim[],
defaultAnim int
playDefaultAnimOnStart bool

Защищенные свойства (Protected)

Свойство Тип Описание
animCompleteDelegate AnimCompleteDelegate
animating bool
curAnim SuperSpriteAnim,
m_started bool

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
AnimFinished ( SuperSpriteAnim, anim ) : void

Описание методов

AnimFinished() защищенный Метод

protected AnimFinished ( SuperSpriteAnim, anim ) : void
anim SuperSpriteAnim,
Результат void

DoAnim() публичный Метод

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.
Результат void

DoAnim() публичный Метод

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.
Результат void

DoAnim() публичный Метод

Plays the specified SuperSprite animation, but only if it isn't playing already.
public DoAnim ( string name ) : void
name string
Результат void

GetAnim() публичный Метод

Returns the SuperSpriteAnim at the specified index.
public GetAnim ( int index ) : SuperSpriteAnim,
index int The index of the desired animation.
Результат SuperSpriteAnim,

GetAnim() публичный Метод

Returns the SuperSpriteAnim with the specified name.
public GetAnim ( string name ) : SuperSpriteAnim,
name string The name of the desired animation.
Результат SuperSpriteAnim,

GetCurAnim() публичный Метод

public GetCurAnim ( ) : SuperSpriteAnim,
Результат SuperSpriteAnim,

Hide() публичный Метод

Hides the SuperSprite.
public Hide ( bool tf ) : void
tf bool
Результат void

IsAnimating() публичный Метод

Returns whether an animation is playing.
public IsAnimating ( ) : bool
Результат bool

IsHidden() публичный Метод

Returns whether the SuperSprite is hidden.
public IsHidden ( ) : bool
Результат bool

PauseAnim() публичный Метод

Pauses the currently playing animation.
public PauseAnim ( ) : void
Результат void

PlayAnim() публичный Метод

Plays the specified SuperSprite animation.
public PlayAnim ( SuperSpriteAnim, anim ) : void
anim SuperSpriteAnim, The SuperSprite animation to be played.
Результат void

PlayAnim() публичный Метод

Plays the specified SuperSprite animation.
public PlayAnim ( int index ) : void
index int The index of the SuperSprite animation to be played.
Результат void

PlayAnim() публичный Метод

Plays the specified SuperSprite animation.
public PlayAnim ( string anim ) : void
anim string The name of the SuperSprite animation to be played.
Результат void

SetAnimCompleteDelegate() публичный Метод

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.
Результат void

Start() публичный Метод

public Start ( ) : void
Результат void

StopAnim() публичный Метод

Stops the current animation from playing and resets it to the beginning for playing again.
public StopAnim ( ) : void
Результат void

UnpauseAnim() публичный Метод

Resumes an animation from where it left off previously.
public UnpauseAnim ( ) : void
Результат void

Описание свойств

animCompleteDelegate защищенное свойство

protected AnimCompleteDelegate animCompleteDelegate
Результат AnimCompleteDelegate

animating защищенное свойство

protected bool animating
Результат bool

animations публичное свойство

The animations that comprise this SuperSprite.
public SuperSpriteAnim[], animations
Результат SuperSpriteAnim[],

curAnim защищенное свойство

protected SuperSpriteAnim, curAnim
Результат SuperSpriteAnim,

defaultAnim публичное свойство

The default animation.
public int defaultAnim
Результат int

m_started защищенное свойство

protected bool m_started
Результат bool

playDefaultAnimOnStart публичное свойство

Whether or not to play the default animation when the object is started.
public bool playDefaultAnimOnStart
Результат bool