Method: widthByTile

Set the object's width to the number of tile width's specified.
widthByTile (Number val, Boolean lockAspect)
  • Numberval Number of tiles.
  • BooleanlockAspect If true, sets the height according to the texture aspect ratio and the new width.
Returns * The object this method was called from to allow method chaining.

Set the width of the entity based on the tile width of the map the entity is mounted to

// Set the entity width to the size of 1 tile with
// lock aspect enabled which will automatically size
// the height as well so as to maintain the aspect
// ratio of the entity
entity.widthByTile(1, true);
© Copyright 2013 Irrelon Software Limited. All Rights Reserved. UK Registered Company Number: 07522767
Isogenic (ī´sōjen´ik): Adj originating from a common source; possessing the same genetic composition.
Strange Things Happen at the One Two Point