Last active
August 29, 2015 14:08
-
-
Save enricllagostera/0382183e6b285fd8060b to your computer and use it in GitHub Desktop.
Function which sets the proper draw order for isometric tiles in BW.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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