Tileset

Series of aligned tiles.

Constructors

this
this()

Ctor

this
this(Tileset tileset)

Copy ctor

this
this(Drawable newDrawable, Vec4i newClip, int newColumns, int newLines, int newMaxTiles)

Ctor

Members

Functions

asSprites
Sprite[] asSprites()

Return each tile as a Sprite.

draw
void draw(int id, Vec2f position)

Render a tile

drawRotated
void drawRotated(int id, Vec2f position)

Render a tile

fit
void fit(Vec2f size_)

Set the sprite's size to fit inside the specified size.

getSprite
Sprite getSprite(int id)

Create a new Sprite from the tile id.

Properties

isLoaded
bool isLoaded [@property getter]

loaded ?

maxtiles
int maxtiles [@property getter]
int maxtiles [@property setter]

Number of tiles

Variables

alpha
float alpha;

Opacity of the tile.

anchor
Vec2f anchor;

Anchor.

angle
float angle;

Angle in which the sprite will be rendered.

blend
Blend blend;

Blending algorithm.

clip
Vec4i clip;

Drawable region of the first tile (the source size).

color
Color color;

Color added to the tile.

columns
int columns;

Number of tiles on the horizontal axis. +//// Number of tiles on the vertical axis

drawable
Drawable drawable;

Source material.

flip
Flip flip;

Mirroring property.

lines
int lines;

Number of tiles on the horizontal axis.

margin
Vec2i margin;

Spacing between each tiles.

scale
Vec2f scale;

Destination size.

size
Vec2f size;

Destination size.

Meta