C# Класс GameEngine.Drawing.Bitmap.BitmapDrawable

Represents a GameDrawable Item that renders some form of bitmap Texture to the screen. Any IGameDrawable subclass that wishes to make use of drawing functionality capable of drawing textures to the screen, this abstract class provides all the drawing logic and just requires the implementation of GetSourceRectangle and GetSourceTexture to be implemented.
Наследование: IGameDrawable
Показать файл Открыть проект

Открытые методы

Метод Описание
BitmapDrawable ( ) : System
Draw ( SpriteBatch spriteBatch, Rectangle destRectangle, Color color, float rotation, Vector2 origin, SpriteEffects spriteEffects, float layerDepth, double elapsedMS ) : void
GetHeight ( double elapsedMS ) : int
GetSourceRectangle ( double elapsedMS ) : Rectangle?

Returns a Rectangle object specifing the SourceRectangle to be used when drawing the SourceTexture specified with GetSourceTexture. Takes an elapsedMS parameter in the case where the Bitmap sublcass would return different SourceRectangles based on the current time (example Animation).

GetSourceTexture ( double elapsedMS ) : Microsoft.Xna.Framework.Graphics.Texture2D

Returns the SourceTexture from which all Draw operations will be performed from. Takes an elapsedMS parameter in the case where the Bitmap subclass would return different Textures based on the current time.

GetWidth ( double elapsedMS ) : int
IsFinished ( double elapsedMS ) : bool

BitmapDrawable provides a default out-of-the-box value - however it is overridable in the case where the value changes with the specified parameter.

Описание методов

BitmapDrawable() публичный Метод

public BitmapDrawable ( ) : System
Результат System

Draw() публичный Метод

public Draw ( SpriteBatch spriteBatch, Rectangle destRectangle, Color color, float rotation, Vector2 origin, SpriteEffects spriteEffects, float layerDepth, double elapsedMS ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
destRectangle Microsoft.Xna.Framework.Rectangle
color Color
rotation float
origin Vector2
spriteEffects SpriteEffects
layerDepth float
elapsedMS double
Результат void

GetHeight() публичный Метод

public GetHeight ( double elapsedMS ) : int
elapsedMS double
Результат int

GetSourceRectangle() публичный Метод

Returns a Rectangle object specifing the SourceRectangle to be used when drawing the SourceTexture specified with GetSourceTexture. Takes an elapsedMS parameter in the case where the Bitmap sublcass would return different SourceRectangles based on the current time (example Animation).
public GetSourceRectangle ( double elapsedMS ) : Rectangle?
elapsedMS double
Результат Rectangle?

GetSourceTexture() публичный Метод

Returns the SourceTexture from which all Draw operations will be performed from. Takes an elapsedMS parameter in the case where the Bitmap subclass would return different Textures based on the current time.
public GetSourceTexture ( double elapsedMS ) : Microsoft.Xna.Framework.Graphics.Texture2D
elapsedMS double
Результат Microsoft.Xna.Framework.Graphics.Texture2D

GetWidth() публичный Метод

public GetWidth ( double elapsedMS ) : int
elapsedMS double
Результат int

IsFinished() публичный Метод

BitmapDrawable provides a default out-of-the-box value - however it is overridable in the case where the value changes with the specified parameter.
public IsFinished ( double elapsedMS ) : bool
elapsedMS double
Результат bool