example code from xcode project use cocos2d game