C# 클래스 MrGravity.AnimatedSprite

파일 보기 프로젝트 열기: DizWARE/Mr-Gravity 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
PreviousFrame int

공개 메소드들

메소드 설명
Draw ( SpriteBatch spriteBatch, Vector2 position ) : void

Draw function - self explanatory

Load ( Microsoft.Xna.Framework.Content.ContentManager content, string name, int frameCount, float fps ) : void

Loads function - self explanatory

Reset ( ) : void

Reset function - Resets the frames and elapsed time to zero

Update ( float elapsed ) : void

Update function - self explanatory

메소드 상세

Draw() 공개 메소드

Draw function - self explanatory
public Draw ( SpriteBatch spriteBatch, Vector2 position ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch the spritebatch to draw
position Microsoft.Xna.Framework.Vector2 where you want the texture to be drawn
리턴 void

Load() 공개 메소드

Loads function - self explanatory
public Load ( Microsoft.Xna.Framework.Content.ContentManager content, string name, int frameCount, float fps ) : void
content Microsoft.Xna.Framework.Content.ContentManager The current content manager
name string Name of the asset - assumes the animatedSprites folder
frameCount int number of frames
fps float Frames Per Second
리턴 void

Reset() 공개 메소드

Reset function - Resets the frames and elapsed time to zero
public Reset ( ) : void
리턴 void

Update() 공개 메소드

Update function - self explanatory
public Update ( float elapsed ) : void
elapsed float elapsed time - if calling in MrGravityMain use (float)gameTime.ElapsedGameTime.TotalSeconds
리턴 void

프로퍼티 상세

PreviousFrame 공개적으로 프로퍼티

public int PreviousFrame
리턴 int