Свойство | Тип | Описание | |
---|---|---|---|
overrideAtt | SpriteAttributes |
Свойство | Тип | Описание | |
---|---|---|---|
AdjustOrderTranslation | void | ||
CopySpriteToIn | void | ||
SetAnimation | void |
Метод | Описание | |
---|---|---|
Draw ( |
Draw this Sprite.
|
|
GetAnimationEffect ( ) : SpriteEffects |
Get animation effect for the current frame of animation.
|
|
GetAnimationFrame ( ) : Rectangle? |
Get animation frame, if it exists, for the current frame of animation.
|
|
GetAnimationOrigin ( ) : Vector2? |
Get animation origin, if it exists, for the current frame of animation.
|
|
GetAnimationRotation ( ) : float? |
Get animation rotation, if it exists, for the current frame of animation.
|
|
GetAnimationScale ( ) : Vector2? |
Get animation scale, if it exists, for the current frame of animation.
|
|
GetAnimationTint ( ) : Color? |
Get animation tint, if it exists, for the current frame of animation.
|
|
OverrideAnimation ( SpriteAttributes component, bool allowed ) : bool |
Some attributes about a Sprite can be determined by it's animation. This function allows the determination of what attributes are allowed to be set by the animation and what are user determined.
|
|
SetAnimation ( int id ) : bool |
Set the animation for the Sprite. IMPORTANT: If the animation is successfully set then the FPS, current frame of animation, and animation region are reset to the default values of the animation.
|
|
SetAnimation ( int id, bool checkGlobal ) : bool |
Set the animation for the Sprite. IMPORTANT: If the animation is successfully set then the FPS, current frame of animation, and animation region are reset to the default values of the animation.
|
|
SetAnimation ( int id, bool checkGlobal, bool global ) : bool |
Set the animation for the Sprite. IMPORTANT: If the animation is successfully set then the FPS, current frame of animation, and animation region are reset to the default values of the animation.
|
|
SetAnimation ( string gameElement ) : bool |
Set the animation for the Sprite. IMPORTANT: If the animation is successfully set then the FPS, current frame of animation, and animation region are reset to the default values of the animation.
|
|
Update ( |
Update this Sprite.
|
Метод | Описание | |
---|---|---|
CopySpriteTo ( Sprite &sp, bool full ) : void |
Copy this Sprite to another Sprite.
|
|
Sprite ( ) : System |
Create a new Sprite with default values.
|
Метод | Описание | |
---|---|---|
AdjustOrderTranslation ( ) : void | ||
CopySpriteToIn ( Sprite &sp, bool full ) : void | ||
SetAnimation ( SpriteManager ani ) : void |
protected abstract CopySpriteTo ( Sprite &sp, bool full ) : void | ||
sp | Sprite | The Sprite to copy to. |
full | bool | true if the entire Sprite should be copied, false if only changes should get copied. |
Результат | void |
public abstract Draw ( |
||
gameTime | The GameTime since the last draw. | |
Результат | void |
public GetAnimationEffect ( ) : SpriteEffects | ||
Результат | SpriteEffects |
public OverrideAnimation ( SpriteAttributes component, bool allowed ) : bool | ||
component | SpriteAttributes | What component of the Sprite should be get/set. |
allowed | bool | true if this compoennt can be overriden by the Sprite's animation, false is otherwise. Can also be set to null if the value should be returned. |
Результат | bool |
public SetAnimation ( int id ) : bool | ||
id | int | The ID of the animation. This is the ID used locally by the Sprite. |
Результат | bool |
public SetAnimation ( int id, bool checkGlobal ) : bool | ||
id | int | The ID of the animation. This is the ID used locally by the Sprite, if the ID could identify global animations then the ID can identify a global animation ID. |
checkGlobal | bool | If global animation should be checked if Sprite specific animation is not found. |
Результат | bool |
public SetAnimation ( int id, bool checkGlobal, bool global ) : bool | ||
id | int | The ID of the animation. This is the ID used locally by the Sprite, if the ID could identify global animations then the ID can identify a global animation ID. |
checkGlobal | bool | If global animation should be checked if Sprite specific animation is not found. |
global | bool | If global animation should be checked before Sprite specific animation. If this is true than |
Результат | bool |
public SetAnimation ( string gameElement ) : bool | ||
gameElement | string | The Asset ID of the animation. |
Результат | bool |
public Update ( |
||
gameTime | The GameTime since the last update. | |
Результат | void |