Fork me on GitHub
View source

package com.haxepunk.graphics

class TiledSpritemap


extends Spritemap

Special Spritemap object that can display blocks of animated sprites.

Constructor

View source

new (source : TileType, frameWidth : Int = 0, frameHeight : Int = 0, width : Int = 0, height : Int = 0, ?callbackFunc : Void ->Void, ) : Void

Constructs the tiled spritemap.


Parameters:
source   

Source image.

frameWidth   

Frame width.

frameHeight   

Frame height.

width   

Width of the block to render.

height   

Height of the block to render.

callbackFunc   

Optional callback function for animation end.

Variables

offsetX : Float

The x-offset of the texture.

offsetY : Float

The y-offset of the texture.

Functions

View source

setOffset (x : Float, y : Float) : Void

Sets the texture offset.


Parameters:
x   

The x-offset.

y   

The y-offset.