« Go back


class Spritesheet: Dgame.Graphic.Sprite.Sprite;
SpriteSheet extends Sprite and act like a Texture Atlas.

Randy Schuett (rswhite4@googlemail.com)

uint timeout;
The timeout between the slides

int numOfExecutions;
The amount of executions of the whole slide -1 or less means infinite sliding

final pure nothrow @nogc this(ref Texture tex);

pure nothrow @nogc this()(ref Texture tex, auto ref const Rect texRect);

final const pure nothrow @nogc @property uint lastUpdate();
Returns the last update which means the last happened slide

final const pure nothrow @nogc @property uint executionCounter();
Returns the current execution count

final nothrow @nogc void slideTextureRect();
Slide / move the current view of the Texture, so that the next view of the Texture will be drawn. This happens by moving the Texture Rect.

If you reached the end of the Texture, the procedure starts from scratch.

final pure nothrow @nogc void selectFrame(ubyte index);
Selects a specific frame and adapts the position of the texture rect. The index starts at 0 and line by line.

The size of your Texture and the size of your Texture-Rect should be divisible without a rest.

final const pure nothrow @nogc uint numOfFrames();
Returns how many frames this Spritesheet has. The width / height of the current Texture is divided through the corresponding width / height of the current Texture-Rect and both values are being multiplied.

Page generated by Ddoc.

» Dgame.Graphic.Spritesheet on Github


« Go back