C# Class Gravitation.SpriteObjects.Sprite

Show file Open project: thedamoes/Gravitation

Public Properties

Property Type Description
AssetName string
Size Microsoft.Xna.Framework.Rectangle
falling bool
framesPerSec int
list List
mSpriteBody FarseerPhysics.Dynamics.Body
spriteOrigin Vector2
spriteSourceHeight int
spriteSourceWidth int
totalFrames int

Protected Properties

Property Type Description
mSpriteBodyTexture Microsoft.Xna.Framework.Graphics.Texture2D
mSpriteSheetTexture Microsoft.Xna.Framework.Graphics.Texture2D
mSpriteTexture Microsoft.Xna.Framework.Graphics.Texture2D

Public Methods

Method Description
Draw ( SpriteBatch theSpriteBatch ) : void
Draw ( SpriteBatch theSpriteBatch, FarseerPhysics.DebugViewXNA debugView, Matrix projection, Matrix view ) : void
LoadContent ( Microsoft.Xna.Framework.Content.ContentManager theContentManager, string theAssetName ) : void
LoadContent ( Microsoft.Xna.Framework.Content.ContentManager theContentManager, string bodyAssetName, string spriteSheetAssetName ) : void
Sprite ( ) : System
Sprite ( Vector2 position, float rotation ) : System
playAnimation ( GameTime gameTime, bool loop ) : void
setAnimationOrigin ( int x, int y ) : void
setFramesPerSec ( int fps ) : void
setSpriteDrawn ( int x, int y ) : void
setSpriteSourceHeightAndWidth ( int height, int width ) : void
setTotalFrames ( int totalFrames ) : void

Method Details

Draw() public method

public Draw ( SpriteBatch theSpriteBatch ) : void
theSpriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
return void

Draw() public method

public Draw ( SpriteBatch theSpriteBatch, FarseerPhysics.DebugViewXNA debugView, Matrix projection, Matrix view ) : void
theSpriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
debugView FarseerPhysics.DebugViewXNA
projection Matrix
view Matrix
return void

LoadContent() public method

public LoadContent ( Microsoft.Xna.Framework.Content.ContentManager theContentManager, string theAssetName ) : void
theContentManager Microsoft.Xna.Framework.Content.ContentManager
theAssetName string
return void

LoadContent() public method

public LoadContent ( Microsoft.Xna.Framework.Content.ContentManager theContentManager, string bodyAssetName, string spriteSheetAssetName ) : void
theContentManager Microsoft.Xna.Framework.Content.ContentManager
bodyAssetName string
spriteSheetAssetName string
return void

Sprite() public method

public Sprite ( ) : System
return System

Sprite() public method

public Sprite ( Vector2 position, float rotation ) : System
position Vector2
rotation float
return System

playAnimation() public method

public playAnimation ( GameTime gameTime, bool loop ) : void
gameTime GameTime
loop bool
return void

setAnimationOrigin() public method

public setAnimationOrigin ( int x, int y ) : void
x int
y int
return void

setFramesPerSec() public method

public setFramesPerSec ( int fps ) : void
fps int
return void

setSpriteDrawn() public method

public setSpriteDrawn ( int x, int y ) : void
x int
y int
return void

setSpriteSourceHeightAndWidth() public method

public setSpriteSourceHeightAndWidth ( int height, int width ) : void
height int
width int
return void

setTotalFrames() public method

public setTotalFrames ( int totalFrames ) : void
totalFrames int
return void

Property Details

AssetName public property

public string AssetName
return string

Size public property

public Rectangle,Microsoft.Xna.Framework Size
return Microsoft.Xna.Framework.Rectangle

falling public property

public bool falling
return bool

framesPerSec public property

public int framesPerSec
return int

list public property

public List list
return List

mSpriteBody public property

public Body,FarseerPhysics.Dynamics mSpriteBody
return FarseerPhysics.Dynamics.Body

mSpriteBodyTexture protected property

protected Texture2D,Microsoft.Xna.Framework.Graphics mSpriteBodyTexture
return Microsoft.Xna.Framework.Graphics.Texture2D

mSpriteSheetTexture protected property

protected Texture2D,Microsoft.Xna.Framework.Graphics mSpriteSheetTexture
return Microsoft.Xna.Framework.Graphics.Texture2D

mSpriteTexture protected property

protected Texture2D,Microsoft.Xna.Framework.Graphics mSpriteTexture
return Microsoft.Xna.Framework.Graphics.Texture2D

spriteOrigin public property

public Vector2 spriteOrigin
return Vector2

spriteSourceHeight public property

public int spriteSourceHeight
return int

spriteSourceWidth public property

public int spriteSourceWidth
return int

totalFrames public property

public int totalFrames
return int