Hey all, avid user and fan of Cocos2d for the iPhone, and decided to try my hand at moving some stuff to the Windows platform for fun.
Had a quick question in regards to using an Object Group form a TMX map, I cannot figure out the proper way to go about this, and it’s been much too long since using template classes and structs…
The Mac/Obj-C code for loading the object group I had is as follows:
CCTMXObjectGroup *objects = [tileMap objectGroupNamed:@"Objects"];
NSAssert(objects != nil, @"'Objects' object group not found");
NSMutableDictionary *spawnPoint = [objects objectNamed:@"SpawnPoint"];
NSAssert(spawnPoint != nil, @"Spawn Point not Found!");
It was straightforward enough until the NSMutableDictionary, I am aware that anything with the NS prefix becomes CC, however I can’t figure out how to get the CCDictionary to work… I’m sure I’m missing something simple, but I’m lost as of now lol…
c++ code up to now:
CCTMXObjectGroup *objects = tileMap->objectGroupNamed("Objects");
CCAssert(objects != NULL, "'Objects' object group not found");
//CCDictionary* spawnPoint = objects->objectNamed("SpawnPoint");
//CCAssert(spawnPoint != NULL, "Spawn Point not Found!");
My failed attempt at using the dictionary… was hopeful, but oh well Any help would be appreciated, I know I’m probably missing something simple probably, but thank you in advance!