Hey
im porting game from cocos2d to cocos2d-x
i have this line of code :
[gameLayer performSelector:
selector(resetGemPosition:)
withObject:self];@
where gameLayer is object instance and resetGemPosition is function in that class
how can it be transleted of cocos2d-x?
thanks
gameLayer->resetGemPosition(this)
.
Ok this is getting wired for me
in Obj-c cocos2d the gameLayer pointer is decelerated like this :
`@interface MAGem : CCSprite {
NSInteger _rowNum; // Row number for this gem
MAPlayfieldLayer *gameLayer; // The game layer
}
`property (nonatomic, assign) MAPlayfieldLayer *gameLayer;
then in the implementation file :
synthesize gameLayer;
then in the implementation file i have this as the question above :
[gameLayer performSelector:
selector(resetGemPosition:)
withObject:self];@
but the strange thing is that i don’t see any where in the OBj-c code that gameLayer pointer gets initialise
dose the property (nonatomic, assign) MAPlayfieldLayer *gameLayer; and the :
synthesize gameLayer;
setting it with initialising ??
how do i translate it to c++ ?
thanks