Skip to content

Instantly share code, notes, and snippets.

@enricllagostera
Last active August 29, 2015 14:08
Show Gist options
  • Save enricllagostera/0382183e6b285fd8060b to your computer and use it in GitHub Desktop.
Save enricllagostera/0382183e6b285fd8060b to your computer and use it in GitHub Desktop.
Function which sets the proper draw order for isometric tiles in BW.
public function updateDrawOrder ():void {
// resets and populates draw layer with world tiles
R.thisWorld.tiles.sortOn("worldY", Array.NUMERIC);
layerWorld.members = [];
for each(var tile:MapTile in R.thisWorld.tiles) {
layerWorld.add(tile);
}
add(layerWorld);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment