Created
July 2, 2012 16:04
-
-
Save nerik/3033985 to your computer and use it in GitHub Desktop.
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
function makeTiles() | |
{ | |
_tilesContainer = new Sprite(); | |
_tiles = new Array(); | |
var line:Array<Tile>; | |
var tile:Tile; | |
for (i in 0...Constants.GRID_H) | |
{ | |
line = new Array(); | |
for (j in 0...Constants.GRID_W) | |
{ | |
tile = new Tile(j,i); | |
tile.x = j * Constants.CELL_W; | |
tile.y = i * Constants.CELL_W; | |
_tilesContainer.addChild(tile); | |
line.push(tile); | |
} | |
_tiles.push(line); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment