C# Class Starwar.Sprites.AnimatedSprite

Inheritance: Sprite
显示文件 Open project: daxnet/Starwar

Public Methods

Method Description
AnimatedSprite ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, SpriteSheet spriteSheet, System.TimeSpan animatedSpeed, int times = -1 ) : System
Draw ( GameTime gameTime, SpriteBatch spriteBatch ) : void
Update ( GameTime gameTime ) : void

Private Methods

Method Description
GetSourceRect ( ) : Rectangle

Method Details

AnimatedSprite() public method

public AnimatedSprite ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, SpriteSheet spriteSheet, System.TimeSpan animatedSpeed, int times = -1 ) : System
texture Microsoft.Xna.Framework.Graphics.Texture2D
position Vector2
spriteSheet SpriteSheet
animatedSpeed System.TimeSpan
times int
return System

Draw() public method

public Draw ( GameTime gameTime, SpriteBatch spriteBatch ) : void
gameTime Microsoft.Xna.Framework.GameTime
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
return void

Update() public method

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