C# 클래스 SGDE.Graphics.Sprite

A drawable sprite object that can be displayed on screen.
상속: SceneNode, IDrawable
파일 보기 프로젝트 열기: sgdc/sgdc-old

보호된 프로퍼티들

프로퍼티 타입 설명
overrideAtt SpriteAttributes

Private Properties

프로퍼티 타입 설명
AdjustOrderTranslation void
CopySpriteToIn void
SetAnimation void

공개 메소드들

메소드 설명
Draw ( GameTime gameTime ) : void

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 ( GameTime gameTime ) : void

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

메소드 상세

CopySpriteTo() 보호된 추상적인 메소드

Copy this Sprite to another Sprite.
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

Draw() 공개 추상적인 메소드

Draw this Sprite.
public abstract Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime The GameTime since the last draw.
리턴 void

GetAnimationEffect() 공개 메소드

Get animation effect for the current frame of animation.
public GetAnimationEffect ( ) : SpriteEffects
리턴 SpriteEffects

GetAnimationFrame() 공개 메소드

Get animation frame, if it exists, for the current frame of animation.
public GetAnimationFrame ( ) : Rectangle?
리턴 Rectangle?

GetAnimationOrigin() 공개 메소드

Get animation origin, if it exists, for the current frame of animation.
public GetAnimationOrigin ( ) : Vector2?
리턴 Vector2?

GetAnimationRotation() 공개 메소드

Get animation rotation, if it exists, for the current frame of animation.
public GetAnimationRotation ( ) : float?
리턴 float?

GetAnimationScale() 공개 메소드

Get animation scale, if it exists, for the current frame of animation.
public GetAnimationScale ( ) : Vector2?
리턴 Vector2?

GetAnimationTint() 공개 메소드

Get animation tint, if it exists, for the current frame of animation.
public GetAnimationTint ( ) : Color?
리턴 Color?

OverrideAnimation() 공개 메소드

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.
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

SetAnimation() 공개 메소드

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.
public SetAnimation ( int id ) : bool
id int The ID of the animation. This is the ID used locally by the Sprite.
리턴 bool

SetAnimation() 공개 메소드

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.
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

SetAnimation() 공개 메소드

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.
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 is ignored.
리턴 bool

SetAnimation() 공개 메소드

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.
public SetAnimation ( string gameElement ) : bool
gameElement string The Asset ID of the animation.
리턴 bool

Sprite() 보호된 메소드

Create a new Sprite with default values.
protected Sprite ( ) : System
리턴 System

Update() 공개 메소드

Update this Sprite.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime The GameTime since the last update.
리턴 void

프로퍼티 상세

overrideAtt 보호되어 있는 프로퍼티

The current SpriteAttributes that can override the Sprite's default attributes.
protected SpriteAttributes overrideAtt
리턴 SpriteAttributes