Example #1
0
 private void ProcessCollisionLayer(MapLayer layer)
 {
     for (int y = 0; y < mapHeight; y++)
         for (int x = 0; x < mapWidth; x++)
         {
             Tile tile = layer.GetTile(x, y);
             if (tile.IsNullTile)
             {
                 if (tile.CollisionType == CollisionType.Unpassable)
                 collisionLayer.SetTile(x, y, CollisionType.Unpassable);
             }
         }
 }