Class: Sprite_Battleback

Sprite_Battleback

new Sprite_Battleback()

The sprite for displaying a background image in battle.

Extends

Members

The image for the tiling sprite

opacitynumberinherited

The opacity of the tiling sprite (0 to 255)
The origin point of the tiling sprite for scrolling

Methods

adjustPosition()

Adjusts the position of the battleback

autotileType(z)number

Get the autotile type the player is standing on
NameTypeDescription
znumberThe z index of the tile to check
Returns:
TypeDescription
numberThe number corresponding to the autotile type
Get the battleback1 bitmap
Returns:
TypeDescription
BitmapThe battleback1 bitmap

battleback1Name()string

Get the name of the battleback1 bitmap
Returns:
TypeDescription
stringThe name of the battleback1 bitmap
Get the battleback2 bitmap
Returns:
TypeDescription
BitmapThe battleback2 bitmap

battleback2Name()string

Get the name of the battleback2 bitmap
Returns:
TypeDescription
stringThe name of the battleback2 bitmap

defaultBattleback1Name()string

Get the default name of the battleback1 bitmap if no other battleback1 is found
Returns:
TypeDescription
stringThe name of the battleback1 bitmap

defaultBattleback2Name()string

Get the default name of the battleback2 bitmap if no other battleback2 is found
Returns:
TypeDescription
stringThe name of the battleback2 bitmap
Destroys the tiling sprite
Initializes the tiling sprite
NameTypeDescription
bitmapBitmapThe image for the tiling sprite

move(x, y, width, height)inherited

Sets the x, y, width, and height of the tiling sprite
NameTypeDescription
xnumberThe x coordinate of the tiling sprite
ynumberThe y coordinate of the tiling sprite
widthnumberThe width of the tiling sprite
heightnumberThe height of the tiling sprite

normalBattleback1Name()string

Get the name of the battleback1 bitmap if the map is a normal map
Returns:
TypeDescription
stringThe name of the battleback1 bitmap

normalBattleback2Name()string

Get the name of the battleback2 bitmap if the map is a normal map
Returns:
TypeDescription
stringThe name of the battleback2 bitmap

overworldBattleback1Name()string

Get the name of the battleback1 bitmap if the map is the overworld
Returns:
TypeDescription
stringThe name of the battleback1 bitmap

overworldBattleback2Name()string

Get the name of the battleback2 bitmap if the map is the overworld
Returns:
TypeDescription
stringThe name of the battleback2 bitmap

setFrame(x, y, width, height)inherited

Specifies the region of the image that the tiling sprite will use
NameTypeDescription
xnumberThe x coordinate of the frame
ynumberThe y coordinate of the frame
widthnumberThe width of the frame
heightnumberThe height of the frame

shipBattleback1Name()string

Get the name of the battleback1 bitmap if the player is in the ship
Returns:
TypeDescription
stringThe name of the battleback1 bitmap

shipBattleback2Name()string

Get the name of the battleback2 bitmap if the player is in the ship
Returns:
TypeDescription
stringThe name of the battleback2 bitmap

terrainBattleback1Name(type)string | null

Get the name of the battleback1 bitmap by terrain type
NameTypeDescription
typenumberThe autotile type of terrain the player is currently on
Returns:
TypeDescription
string|nullThe name of the battleback1 bitmap. Can be null if no matching type found

terrainBattleback2Name(type)string | undefined

Get the name of the battleback2 bitmap by terrain type
NameTypeDescription
typenumberThe autotile type of terrain the player is currently on
Returns:
TypeDescription
string|undefinedThe name of the battleback2 bitmap. Can be undefined if no matching type found
Updates the tiling sprite for each frame
Updates the transform on all children of this container for rendering