I've got an issue when I try to load a .tmx file in a CCTileMap CocosSharp object.
Here is the code :
layer2 = new CCLayer();
CCTileMap tileMap;
tileMap = new CCTileMap("TestCCS.Droid.Assets/TileMaps/TestTile2.tmx");
layer2.AddChild(tileMap);
this.AddChild(layer2);
I tried :
tileMap = new CCTileMap("TestCCS.Droid.Assets.TileMaps.TestTile2.tmx");
or :
tileMap = new CCTileMap("Assets.TileMaps.TestTile2.tmx");
The TestTile2.tmx file build Action is set to "Embedded resource"
And this my solution explorer :
Thank you for your help.
Found a way to load the TileMap file.
The solution I found :
save the .tsx file in .xml format.
I use this code to load the tile map file :
layer2 = new CCLayer();
CCTileMap tileMap;
CCTileMapInfo mi = new CCTileMapInfo("TestTile2.xml");
tileMap = new CCTileMap(mi);
layer2.AddChild(tileMap);
this.AddChild(layer2);
Where "TestTile2.xml" is an android asset.
Hope this will help others !