Skip to content

Instantly share code, notes, and snippets.

@sjakaus
Created September 28, 2010 14:52
Show Gist options
  • Save sjakaus/601130 to your computer and use it in GitHub Desktop.
Save sjakaus/601130 to your computer and use it in GitHub Desktop.
var collisionGrid:Grid = new Grid(96,96,16,16);
for(i = 0; i < 96; i++)
{
for(j = 0; j < 97; j++)
{
if(myTiles.getTile(i,j)==0)
{
collisionGrid.setCell(i,j,true);
}
else
{
collisionGrid.setCell(i,j,false);
}
}
}
mask = collisionGrid;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment