The Programmer Guide, originally, was geared towards that and we realized that it didn’t make sense. People’s interest in games is different and we felt that readers would stop reading if the sample game was of no interest.
Currently the Programmer Guide is getting put up chapter by chapter, I have more chapters to get up already. It contains source code for each chapter demonstrating the concepts in that chapter.
i meant to say, i wish there’s a working example for in-app purchase with regard to ‘buying coins’ , ‘buying levels’ , ‘removing ads forever’. those stuff. i’ve spent two weeks on a wild goose chase on how to implement in-apps(iOS) in Cocos2dX and I have yet to find it. and please dont suggest soomla
same here… i also try soomla, but no luck… i’m looking for a wrapper for object-c and an object-c class for inapt or a good example code… i found few but all of them are deprecated or not complete or disaster to implement… i really want an inapp example too!!!
i have managed to call objective c functions using c++, it’s not that complicated. Things get awry and tawdry when I try to implement the “real in-app” functions. If only someone could make use of Ray Wenderlich’s tutorial(cocos2d) and convert it to Cocos2dX.
But, please everyone, realize that this is the “Programmer Guide for Cocos2d-x” Its not a “tutorial on how to integrate products out of our control into Cocos2d-x guide.”
Hey @steknika did you finally make it work?? Hope you can share it^_^ I am having a tidbit of a problem here. I can give you my erroneous source code so you can take a look or you can just share your working method ( github or dropbox)
I looked into AnySDK. It seems like it may require you to compile your code with their tool. Maybe even upload it to their site. Is that correct? That’s not something I want to do.
It’s cause the code does not return a boolean. Just type return true; in the function body.
The full signature is std::function<bool(Touch*, Event*)> onTouchBegan; and the full function header would be: listener1->onTouchBegan = [](Touch* touch, Event* event) -> bool { ... };
The code in the example is just the short version and the compiler will try to figure it out. It’s similar to the auto type, but as long as you don’t return a boolean, it will not match the signature.