coco2dx专题

coco2dx新建项目报错,ld: -pie can only be used when targeting iOS 4.2 or later clang: error: linker command

在新建cocos2d-x以后,运行发现以下错误: ld: -pie can only be used when targeting iOS 4.2 or later clang: error: linker command failed with exit code 1 (use -v to see invocation) 如图所示: 这时候,选中左上角

coco2dx-关于精灵的简单碰撞检测-随心

1.两个精灵在同一个父类上,代码如下 CCRect r1 = spr1->boundingBox();CCRect r2 = spr2->boundingBox();// 判断是否有交叉if (r1.intersectsRect(r2)) {CCLOG("---%s---", "相碰撞了");}2.两个精灵不在同一个父类上,代码如下 void collisionDetec