C# Class WaveEngine.Components.Graphics2D.Sprite

Represents a 2D Image.
Inheritance: Component
Datei anzeigen Open project: WaveEngine/Components Class Usage Examples

Protected Properties

Property Type Description
disposed bool
texture Texture

Private Properties

Property Type Description
InitMaterial void
LoadTexture void
RefreshMaterialFromPath void
RefreshTexture void
UnloadTexture void

Public Methods

Method Description
Dispose ( ) : void

Releases unmanaged and - optionally - managed resources.

Sprite ( ) : System

Initializes a new instance of the Sprite class based on a content file.

Sprite ( Material material ) : System

Initializes a new instance of the Sprite class based on a content file.

Sprite ( Texture texture ) : System

Initializes a new instance of the Sprite class based on a texture. See Texture for more information.

Sprite ( string texturePath ) : System

Initializes a new instance of the Sprite class based on a content file.

Protected Methods

Method Description
DefaultValues ( ) : void

The default values

Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources

Initialize ( ) : void

Performs further custom initialization for this instance.

UpdateSourceRectangle ( ) : void

The update source rectangle.

Private Methods

Method Description
InitMaterial ( ) : void

Init material

LoadTexture ( ) : void

Load texture

RefreshMaterialFromPath ( ) : void

Init material

RefreshTexture ( ) : void

Refresh the sprite texture

UnloadTexture ( ) : void

Unload texture

Method Details

DefaultValues() protected method

The default values
protected DefaultValues ( ) : void
return void

Dispose() public method

Releases unmanaged and - optionally - managed resources.
public Dispose ( ) : void
return void

Dispose() protected method

Releases unmanaged and - optionally - managed resources
protected Dispose ( bool disposing ) : void
disposing bool /// true to release both managed and unmanaged resources; false to release only unmanaged resources. ///
return void

Initialize() protected method

Performs further custom initialization for this instance.
protected Initialize ( ) : void
return void

Sprite() public method

Initializes a new instance of the Sprite class based on a content file.
public Sprite ( ) : System
return System

Sprite() public method

Initializes a new instance of the Sprite class based on a content file.
Material can not be null.
public Sprite ( Material material ) : System
material Material The material used to render the sprite.
return System

Sprite() public method

Initializes a new instance of the Sprite class based on a texture. See Texture for more information.
Texture can not be null.
public Sprite ( Texture texture ) : System
texture Texture The texture.
return System

Sprite() public method

Initializes a new instance of the Sprite class based on a content file.
TexturePath can not be null.
public Sprite ( string texturePath ) : System
texturePath string The texture path to the content file.
return System

UpdateSourceRectangle() protected method

The update source rectangle.
Sprite has been disposed.
protected UpdateSourceRectangle ( ) : void
return void

Property Details

disposed protected_oe property

The disposed
protected bool disposed
return bool

texture protected_oe property

The sprite texture
protected Texture texture
return Texture