MapService
Service class for maps.
This Service class provides different methods to process map objects
Tags
Table of Contents
- findLayers() : array<string|int, mixed>
- Find all layers within the container as ordered array.
- getCalculatedHeight() : int|null
- calculate the total height of a map in tiles.
- getCalculatedWidth() : int|null
- Calculate the width of a map in tiles.
- getInfiniteMapOffsetX() : int|null
- get the offset x of an infinite map.
- getInfiniteMapOffsetY() : int|null
- get the total offset y of an infinite map.
- getMapOffsetX() : int
- Get the largest offset x of an map from all layers.
- getMapOffsetY() : int
- Get the largest offset y of an map from all layers.
Methods
findLayers()
Find all layers within the container as ordered array.
public
static findLayers(GroupContainer $container) : array<string|int, mixed>
Parameters
- $container : GroupContainer
-
Container which can hold a layer
Return values
array<string|int, mixed> —Ordered array of layers
getCalculatedHeight()
calculate the total height of a map in tiles.
public
static getCalculatedHeight(Map $instance) : int|null
Parameters
- $instance : Map
Return values
int|null —getCalculatedWidth()
Calculate the width of a map in tiles.
public
static getCalculatedWidth(Map $instance) : int|null
Parameters
- $instance : Map
Return values
int|null —getInfiniteMapOffsetX()
get the offset x of an infinite map.
public
static getInfiniteMapOffsetX(Map $instance) : int|null
Parameters
- $instance : Map
Return values
int|null —getInfiniteMapOffsetY()
get the total offset y of an infinite map.
public
static getInfiniteMapOffsetY(Map $instance) : int|null
Parameters
- $instance : Map
Return values
int|null —getMapOffsetX()
Get the largest offset x of an map from all layers.
public
static getMapOffsetX(Map $instance) : int
Parameters
- $instance : Map
Return values
int —getMapOffsetY()
Get the largest offset y of an map from all layers.
public
static getMapOffsetY(Map $instance) : int
Parameters
- $instance : Map