RegionManager.getEntityLocation()

   
Type function
Library wattageTileEngine.RegionManager.*
Return value Number, Number
Keywords  
See also  

Overview

This function will return the X and Y coordinates of the entity in world space.

NOTE: This function should always be used when utilizing the RegionManager. Getting the x and y values directly from the sprite will not factor in the local to world coordinate conversions.

Syntax

RegionManager.getEntityLocation( entityLayerIndex, entityId )
entityLayerIndex (required)

Number. The index of the entity layer that contains the entity ID.

entityId (required)

Number. The ID of the entity to get the position of.

Examples

local x, y = regionManager.getEntityLocation(2, 42)