C# Class Nez.TiledSprite

Tiled sprite. Note that TiledSprite overrides the Material so that it can wrap the UVs. This class requires the texture to not be part of an atlas so that wrapping can work.
Inheritance: Sprite
Mostra file Open project: prime31/Nez

Protected Properties

Property Type Description
_sourceRect Microsoft.Xna.Framework.Rectangle

Public Methods

Method Description
TiledSprite ( Subtexture subtexture ) : Nez.Sprites
TiledSprite ( Microsoft.Xna.Framework.Graphics.Texture2D texture ) : Nez.Sprites
render ( Graphics graphics, Camera camera ) : void

Method Details

TiledSprite() public method

public TiledSprite ( Subtexture subtexture ) : Nez.Sprites
subtexture Nez.Textures.Subtexture
return Nez.Sprites

TiledSprite() public method

public TiledSprite ( Microsoft.Xna.Framework.Graphics.Texture2D texture ) : Nez.Sprites
texture Microsoft.Xna.Framework.Graphics.Texture2D
return Nez.Sprites

render() public method

public render ( Graphics graphics, Camera camera ) : void
graphics Graphics
camera Camera
return void

Property Details

_sourceRect protected_oe property

we keep a copy of the sourceRect so that we dont change the Subtexture in case it is used elsewhere
protected Rectangle,Microsoft.Xna.Framework _sourceRect
return Microsoft.Xna.Framework.Rectangle