Otter  0.9.8.91
2d Game Development Framework based on SFML.Net
 All Classes Namespaces Functions Variables Enumerations Properties
Otter.TileInfo Class Reference

A class containing all the info to describe a specific tile. More...

Public Member Functions

 TileInfo (int x, int y, int tx, int ty, int width, int height, Color color=null, float alpha=1)
 
int GetIndex (Tilemap tilemap)
 Returns the index of the tile on the source Texture of a Tilemap. More...
 

Public Attributes

int X
 The X position of the tile. More...
 
int Y
 The Y position of the tile. More...
 
int TX
 The X position of the source texture to render the tile from. More...
 
int TY
 The Y position of the source texture to render the tile from. More...
 
int Width
 The width of the tile. More...
 
int Height
 The height of the tile. More...
 
bool FlipX
 Flipped tile options. More...
 
bool FlipY
 
bool FlipD
 Flips the tile anti-diagonally, equivalent to a 90 degree rotation and a horizontal flip. Combined with FlipX and FlipY you can rotate the tile any direction. More...
 
Color Color
 The color of the tile, or the color to tint the texture. More...
 

Properties

float Alpha [get, set]
 The alpha of the tile. More...
 

Detailed Description

A class containing all the info to describe a specific tile.

Member Function Documentation

int Otter.TileInfo.GetIndex ( Tilemap  tilemap)

Returns the index of the tile on the source Texture of a Tilemap.

Parameters
tilemapThe Tilemap that uses the Texture to be tested against.
Returns
The index of the tile on the Tilemap's Texture.

Member Data Documentation

Color Otter.TileInfo.Color

The color of the tile, or the color to tint the texture.

bool Otter.TileInfo.FlipD

Flips the tile anti-diagonally, equivalent to a 90 degree rotation and a horizontal flip. Combined with FlipX and FlipY you can rotate the tile any direction.

bool Otter.TileInfo.FlipX

Flipped tile options.

int Otter.TileInfo.Height

The height of the tile.

int Otter.TileInfo.TX

The X position of the source texture to render the tile from.

int Otter.TileInfo.TY

The Y position of the source texture to render the tile from.

int Otter.TileInfo.Width

The width of the tile.

int Otter.TileInfo.X

The X position of the tile.

int Otter.TileInfo.Y

The Y position of the tile.

Property Documentation

float Otter.TileInfo.Alpha
getset

The alpha of the tile.


The documentation for this class was generated from the following file: