public void GenerateRandomMap() { if (m_TestLayer == null) { return; } Vector2 tiles = MapHandler.GetInstance().GetTileSetSizeByTiles(m_TestLayer.GetTileSetRef(), new Vector2(64, 64)); int totalTiles = (int)(tiles.X * tiles.Y); Random rand = new Random(); for (int i = 0; i < m_TestLayer.GetMapSize().Y; i++) { for (int j = 0; j < m_TestLayer.GetMapSize().X; j++) { int tileID = 0;//134;//34;//rand.Next(0, totalTiles); m_TestLayer.AddTile(tileID, new Vector2(i, j)); } } }