TiledSpriteRuntimeObject

TiledSpriteRuntimeObject

The TiledSpriteRuntimeObject displays a tiled texture.

Constructor

new TiledSpriteRuntimeObject(runtimeScene, tiledSpriteObjectData)

Parameters:
Name Type Description
runtimeScene

The scene the object belongs to.

tiledSpriteObjectData

The initial properties of the object

Source:

Methods

extraInitializationFromInitialInstance()

Initialize the extra parameters that could be set for an instance.

Source:

getColor()

Get the tint of the tiled sprite object.

Returns:
Type Description

The color, in RGB format ("128;200;255").

Source:

getHeight()

Get the height of the Tiled Sprite object.

Returns:
Type Description

The height of the Tiled Sprite object

Source:

getOpacity()

Get the transparency of the object.

Returns:
Type Description

The opacity, between 0 (transparent) and 255 (opaque).

Source:

getScale()

Get scale of the tiled sprite object.

Source:

getScaleX()

Get x-scale of the tiled sprite object.

Source:

getScaleY()

Get y-scale of the tiled sprite object.

Source:

getWidth()

Get the width of the Tiled Sprite object.

Returns:
Type Description

The width of the Tiled Sprite object

Source:

getXOffset()

Get the offset on the X-axis of the Tiled Sprite object.

Returns:
Type Description

The offset on the X-axis

Source:

getYOffset()

Get the offset on the Y-axis of the Tiled Sprite object.

Returns:
Type Description

The offset on the Y-axis

Source:

setAngle(angle)

Set the angle of the Tiled Sprite object.

Parameters:
Name Type Description
angle

The new angle.

Source:

setColor(rgbColor)

Change the tint of the tiled sprite object.

Parameters:
Name Type Description
rgbColor

The color, in RGB format ("128;200;255").

Source:

setHeight(height)

Set the height of the Tiled Sprite object.

Parameters:
Name Type Description
height

The new height.

Source:

setOpacity(opacity)

Change the transparency of the object.

Parameters:
Name Type Description
opacity

The new opacity, between 0 (transparent) and 255 (opaque).

Source:

setScale(newScale)

Set the tiled sprite object scale.

Parameters:
Name Type Description
newScale

The new scale for the tiled sprite object.

Source:

setScaleX(newScale)

Set the tiled sprite object x-scale.

Parameters:
Name Type Description
newScale

The new x-scale for the tiled sprite object.

Source:

setScaleY(newScale)

Set the tiled sprite object y-scale.

Parameters:
Name Type Description
newScale

The new y-scale for the tiled sprite object.

Source:

setTexture(textureName, runtimeScene)

Assign a new texture to the Tiled Sprite object.

Parameters:
Name Type Description
textureName

The name of the image texture ressource.

runtimeScene

The scene in which the texture is used.

Source:

setWidth(width)

Set the width of the Tiled Sprite object.

Parameters:
Name Type Description
width

The new width.

Source:

setX(x)

Set the X position of the Tiled Sprite object.

Parameters:
Name Type Description
x

The new X position.

Source:

setXOffset(xOffset)

Set the offset on the X-axis when displaying the image of the Tiled Sprite object.

Parameters:
Name Type Description
xOffset

The new offset on the X-axis.

Source:

setY(y)

Set the Y position of the Tiled Sprite object.

Parameters:
Name Type Description
y

The new Y position.

Source:

setYOffset(yOffset)

Set the offset on the Y-axis when displaying the image of the Tiled Sprite object.

Parameters:
Name Type Description
yOffset

The new offset on the Y-axis.

Source: