Arcade
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
GameAPI.BudgetBoy.Sprite Class Reference

A basic rendering primitive containing an image, a swatch to apply to it, and a location to draw it on-screen. More...

Inheritance diagram for GameAPI.BudgetBoy.Sprite:
GameAPI.BudgetBoy.IRenderable GameAPI.BudgetBoy.Text

Public Member Functions

 Sprite (Image image, SwatchIndex swatchIndex, Vector2F position=default(Vector2F))
 Constructs a new sprite using the specified Image and SwatchIndex. More...
 
virtual void Render (Graphics graphics)
 Render to screen. More...
 

Protected Member Functions

void GetGlare (Graphics graphics, out Color24 avgColor, out float coverage)
 

Properties

Image Image [get, set]
 The Image used for this sprite. More...
 
Vector2F Position [get, set]
 World space position. More...
 
float X [get, set]
 World space x-position. More...
 
float Y [get, set]
 World space y-position. More...
 
virtual Vector2I Size [get]
 Width and Height of this sprite's Image. More...
 
int Width [get]
 Width of this sprite's Image. More...
 
int Height [get]
 Height of this sprite's Image. More...
 
bool FlipX [get, set]
 Determines whether this sprite's Image is drawn flipped along the x-axis. More...
 
bool FlipY [get, set]
 Determines whether this sprite's Image is drawn flipped along the y-axis. More...
 
int Orientation [get, set]
 Local integer rotation. (0 = no rotation, 1 = 90° counter-clockwise, 2 = 180°, 3 = 90° clockwise) More...
 
bool IsVisible [get, set]
 Is this sprite visible? More...
 
SwatchIndex SwatchIndex [get, set]
 Swatch index from the palette to render with. More...
 

Detailed Description

A basic rendering primitive containing an image, a swatch to apply to it, and a location to draw it on-screen.

Constructor & Destructor Documentation

GameAPI.BudgetBoy.Sprite.Sprite ( Image  image,
SwatchIndex  swatchIndex,
Vector2F  position = default(Vector2F) 
)
inline

Constructs a new sprite using the specified Image and SwatchIndex.

Parameters
imageThe Image to display for this sprite.
swatchIndexThe swatch of colors to use for this sprite.
positionThe initial position of this sprite.

Member Function Documentation

void GameAPI.BudgetBoy.Sprite.GetGlare ( Graphics  graphics,
out Color24  avgColor,
out float  coverage 
)
inlineprotected
virtual void GameAPI.BudgetBoy.Sprite.Render ( Graphics  graphics)
inlinevirtual

Render to screen.

Parameters
graphicsThe Graphics context to render with.

Implements GameAPI.BudgetBoy.IRenderable.

Reimplemented in GameAPI.BudgetBoy.Text.

Property Documentation

bool GameAPI.BudgetBoy.Sprite.FlipX
getset

Determines whether this sprite's Image is drawn flipped along the x-axis.

bool GameAPI.BudgetBoy.Sprite.FlipY
getset

Determines whether this sprite's Image is drawn flipped along the y-axis.

int GameAPI.BudgetBoy.Sprite.Height
get

Height of this sprite's Image.

Image GameAPI.BudgetBoy.Sprite.Image
getset

The Image used for this sprite.

bool GameAPI.BudgetBoy.Sprite.IsVisible
getset

Is this sprite visible?

int GameAPI.BudgetBoy.Sprite.Orientation
getset

Local integer rotation. (0 = no rotation, 1 = 90° counter-clockwise, 2 = 180°, 3 = 90° clockwise)

Vector2F GameAPI.BudgetBoy.Sprite.Position
getset

World space position.

virtual Vector2I GameAPI.BudgetBoy.Sprite.Size
get

Width and Height of this sprite's Image.

SwatchIndex GameAPI.BudgetBoy.Sprite.SwatchIndex
getset

Swatch index from the palette to render with.

int GameAPI.BudgetBoy.Sprite.Width
get

Width of this sprite's Image.

float GameAPI.BudgetBoy.Sprite.X
getset

World space x-position.

float GameAPI.BudgetBoy.Sprite.Y
getset

World space y-position.