cocos2d

cocos2d DrawNode图形渐变

//点变线voidHelloWorld::dotChangetoLine(intcurMenutag){log("dotChangetoLine");//是一条窄窄的矩形线DrawNode*drawmove=static_cast(PointMoveBox->getChildByTag(SolidLineTag));//twowordslensublinedrawhome->

Cocos2dx-jsb 3.x 精灵构建过程浅析:

Cocos2dx-jsb3.x精灵构建过程浅析:1、我们在使用精灵是一般类似于下面这样:this.sprite=newcc.Sprite;this.addChild;我们知道这样用,但是调用过程是怎样的呢?在cocos提供的script文件夹下有个jsb_create_apis.js文件,这里面有我们需要的函数:ifScriptingcore::getInstance()->executeFunctionWithOwner;returntrue;}3、下面这段,就是有关精灵调用的部分,看到了吧,这个函数,

Cocos2D旋转炮塔到指定角度(二)

增加如下代码到cctouchesEnded方法中,就在你在导弹精灵上调用runAction之前:现在编译运行项目,炮台应该应该可以旋转到合适的角度去射击了.