C# 클래스 Category5.Animation

파일 보기 프로젝트 열기: AnyKey/tojam4 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
color Color
currentFrame int
frameCount int
frameHeight int
frameWidth int
lastAnimTime float
texture Microsoft.Xna.Framework.Graphics.Texture2D
timeBetweenFrames float

공개 메소드들

메소드 설명
Animation ( Microsoft.Xna.Framework.Graphics.Texture2D aTexture, int fWidth, int fHeight, float animTime ) : System

Constructor to assign values to all fields

Copy ( ) : Animation
Draw ( SpriteBatch sBatch, Rectangle dest, double direction ) : void

Draw a frame of the animation to the screen at the given location. dest specifies the rectangle to be filled by the frame Direction value orients the frame, and is given in radians

Draw ( SpriteBatch sBatch, Rectangle2D dest, double direction ) : void

Draw a frame of the animation to the screen at the given location. dest specifies the rectangle to be filled by the frame Direction value orients the frame, and is given in radians

Draw ( SpriteBatch sBatch, Vector2 location, double direction ) : void

Draw a frame of the animation to the screen at the given location. Location specifies the CENTER of the frame Direction value orients the frame, and is given in radians

FastDraw ( SpriteBatch sBatch, Rectangle dest ) : void

Draw a frame of the animation to the screen at given location by rectangle bounds without rotation

Update ( float elapsedTime ) : void
resetColor ( ) : void

Reset the color of the animation to what is was originally

setColor ( Color newColor ) : void

Changes the color of the animation permanently

setCurrentFrame ( int newFrame ) : void

Sets the current frame of the animation Frame numbers start at 0 and go to frameCount - 1

비공개 메소드들

메소드 설명
nextFrame ( ) : void

메소드 상세

Animation() 공개 메소드

Constructor to assign values to all fields
public Animation ( Microsoft.Xna.Framework.Graphics.Texture2D aTexture, int fWidth, int fHeight, float animTime ) : System
aTexture Microsoft.Xna.Framework.Graphics.Texture2D
fWidth int
fHeight int
animTime float
리턴 System

Copy() 공개 메소드

public Copy ( ) : Animation
리턴 Animation

Draw() 공개 메소드

Draw a frame of the animation to the screen at the given location. dest specifies the rectangle to be filled by the frame Direction value orients the frame, and is given in radians
public Draw ( SpriteBatch sBatch, Rectangle dest, double direction ) : void
sBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
dest Microsoft.Xna.Framework.Rectangle
direction double
리턴 void

Draw() 공개 메소드

Draw a frame of the animation to the screen at the given location. dest specifies the rectangle to be filled by the frame Direction value orients the frame, and is given in radians
public Draw ( SpriteBatch sBatch, Rectangle2D dest, double direction ) : void
sBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
dest Rectangle2D
direction double
리턴 void

Draw() 공개 메소드

Draw a frame of the animation to the screen at the given location. Location specifies the CENTER of the frame Direction value orients the frame, and is given in radians
public Draw ( SpriteBatch sBatch, Vector2 location, double direction ) : void
sBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
location Vector2
direction double
리턴 void

FastDraw() 공개 메소드

Draw a frame of the animation to the screen at given location by rectangle bounds without rotation
public FastDraw ( SpriteBatch sBatch, Rectangle dest ) : void
sBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
dest Microsoft.Xna.Framework.Rectangle
리턴 void

Update() 공개 메소드

public Update ( float elapsedTime ) : void
elapsedTime float
리턴 void

resetColor() 공개 메소드

Reset the color of the animation to what is was originally
public resetColor ( ) : void
리턴 void

setColor() 공개 메소드

Changes the color of the animation permanently
public setColor ( Color newColor ) : void
newColor Color
리턴 void

setCurrentFrame() 공개 메소드

Sets the current frame of the animation Frame numbers start at 0 and go to frameCount - 1
public setCurrentFrame ( int newFrame ) : void
newFrame int
리턴 void

프로퍼티 상세

color 보호되어 있는 프로퍼티

protected Color color
리턴 Color

currentFrame 보호되어 있는 프로퍼티

protected int currentFrame
리턴 int

frameCount 보호되어 있는 프로퍼티

protected int frameCount
리턴 int

frameHeight 보호되어 있는 프로퍼티

protected int frameHeight
리턴 int

frameWidth 보호되어 있는 프로퍼티

protected int frameWidth
리턴 int

lastAnimTime 보호되어 있는 프로퍼티

protected float lastAnimTime
리턴 float

texture 보호되어 있는 프로퍼티

protected Texture2D,Microsoft.Xna.Framework.Graphics texture
리턴 Microsoft.Xna.Framework.Graphics.Texture2D

timeBetweenFrames 보호되어 있는 프로퍼티

protected float timeBetweenFrames
리턴 float