C# 클래스 XNATestBed.Sprite

파일 보기 프로젝트 열기: ReticentJohn/Spring-Project-2011

공개 프로퍼티들

프로퍼티 타입 설명
isAnimated bool
isMoving bool
movementDestination Vector2
position Vector2
visible bool

공개 메소드들

메소드 설명
CopyFromSprite ( Sprite loadedSprite ) : void
Draw ( SpriteBatch spriteBatch ) : void

Draw the sprite at its current position.

Draw ( SpriteBatch spriteBatch, Vector2 drawingPosition ) : void

Draw the sprite at the specified position. Assumes the sprite is not moving.

Draw ( SpriteBatch spriteBatch, float rotation ) : void

Draw the sprite at its current position with a given radian rotation. (This is a flimsy function for special cases. Will be updated when needed.)

LoadContent ( Microsoft.Xna.Framework.Content.ContentManager contentManager, string textureName ) : void

Load the texture for the sprite using the Content Pipeline If no frames specified, then assume the sprite will never be animated and thus has only 1 frame.

LoadContent ( Microsoft.Xna.Framework.Content.ContentManager contentManager, string textureName, int maxNumOfFrames, int maxNumOfFrameSets ) : void

Load the texture for the sprite using the Content Pipeline

Sprite ( ) : System
Sprite ( Sprite loadedSprite ) : System
StartAnimation ( float aniInterval, bool onlyAnimateOnce ) : void

Using the sprite's current frame and frame set, animate through its frameset either indefinitely or at least once, at the given interval.

StartMovement ( Vector2 destinationPosition, float moveSpeed ) : void

Set the sprite to move from its current drawing position to the given position, at the specified speed.

StartMovementTimed ( Vector2 destinationPosition, float timeToMove ) : void

Set the sprite to move from its current drawing position to the given position, completing it within the specified time.

Update ( GameTime gameTime ) : void

메소드 상세

CopyFromSprite() 공개 메소드

public CopyFromSprite ( Sprite loadedSprite ) : void
loadedSprite Sprite
리턴 void

Draw() 공개 메소드

Draw the sprite at its current position.
public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
리턴 void

Draw() 공개 메소드

Draw the sprite at the specified position. Assumes the sprite is not moving.
public Draw ( SpriteBatch spriteBatch, Vector2 drawingPosition ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
drawingPosition Vector2
리턴 void

Draw() 공개 메소드

Draw the sprite at its current position with a given radian rotation. (This is a flimsy function for special cases. Will be updated when needed.)
public Draw ( SpriteBatch spriteBatch, float rotation ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
rotation float
리턴 void

LoadContent() 공개 메소드

Load the texture for the sprite using the Content Pipeline If no frames specified, then assume the sprite will never be animated and thus has only 1 frame.
public LoadContent ( Microsoft.Xna.Framework.Content.ContentManager contentManager, string textureName ) : void
contentManager Microsoft.Xna.Framework.Content.ContentManager
textureName string
리턴 void

LoadContent() 공개 메소드

Load the texture for the sprite using the Content Pipeline
public LoadContent ( Microsoft.Xna.Framework.Content.ContentManager contentManager, string textureName, int maxNumOfFrames, int maxNumOfFrameSets ) : void
contentManager Microsoft.Xna.Framework.Content.ContentManager
textureName string
maxNumOfFrames int
maxNumOfFrameSets int
리턴 void

Sprite() 공개 메소드

public Sprite ( ) : System
리턴 System

Sprite() 공개 메소드

public Sprite ( Sprite loadedSprite ) : System
loadedSprite Sprite
리턴 System

StartAnimation() 공개 메소드

Using the sprite's current frame and frame set, animate through its frameset either indefinitely or at least once, at the given interval.
public StartAnimation ( float aniInterval, bool onlyAnimateOnce ) : void
aniInterval float
onlyAnimateOnce bool
리턴 void

StartMovement() 공개 메소드

Set the sprite to move from its current drawing position to the given position, at the specified speed.
public StartMovement ( Vector2 destinationPosition, float moveSpeed ) : void
destinationPosition Vector2
moveSpeed float
리턴 void

StartMovementTimed() 공개 메소드

Set the sprite to move from its current drawing position to the given position, completing it within the specified time.
public StartMovementTimed ( Vector2 destinationPosition, float timeToMove ) : void
destinationPosition Vector2
timeToMove float
리턴 void

Update() 공개 메소드

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
리턴 void

프로퍼티 상세

isAnimated 공개적으로 프로퍼티

public bool isAnimated
리턴 bool

isMoving 공개적으로 프로퍼티

public bool isMoving
리턴 bool

movementDestination 공개적으로 프로퍼티

public Vector2 movementDestination
리턴 Vector2

position 공개적으로 프로퍼티

public Vector2 position
리턴 Vector2

visible 공개적으로 프로퍼티

public bool visible
리턴 bool