RegionManager.getNonResourceEntityLocation()

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

Overview

This function will return the X and Y coordinates of the non-resource 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.getNonResourceEntityLocation( entityLayerIndex, nonResourceEntityId )
entityLayerIndex (required)

Number. The index of the entity layer that contains the non-resource entity ID.

nonResourceEntityId (required)

Number. The ID of the non-resource entity to get the position of.

Examples

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