RegionManager.centerNonResourceEntityOnTile()

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

Overview

This function will center a non-resource entity on the specified tile.

NOTE: This function should always be used when utilizing the RegionManager. The function on the EntityLayer with the same name should not be used as it does not handle the world and local coordinate systems like this function does.

Syntax

RegionManager.centerNonResourceEntityOnTile( entityLayerIndex, nonResourceEntityId, worldRow, worldColumn )
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 center on the tile.

worldRow (required)

Number. The row to center the non-resource entity on. This coordinate is in world coordinates not local layer coordinates.

worldColumn (required)

Number. The column to center the non-resource entity on. This coordinate is in world coordinates not local layer coordinates.

Examples

regionManager.centerNonResourceEntityOnTile(2, 42, 1, 1)