¡@

Home 

2014/10/15 ¤U¤È 10:04:57

iphone Programming Glossary: ccpsub

Applying Zoom Effect In cocos2D gaming environment?

http://stackoverflow.com/questions/5919180/applying-zoom-effect-in-cocos2d-gaming-environment

ccp scaleCenter.x yourLayer.scale scaleCenter.y yourLayer.scale Then calculate the delta. CGPoint centerPointDelta ccpSub oldCenterPoint newCenterPoint Now adjust your layer by the delta. yourLayer.position ccpAdd yourLayer.position centerPointDelta..

Rotate a Sprite on a bezier path with touch - Cocos2D/Box2D

http://stackoverflow.com/questions/7494795/rotate-a-sprite-on-a-bezier-path-with-touch-cocos2d-box2d

location CGPoint firstTouchingPoint CCDirector sharedDirector convertToGL firstLocation CGPoint firstVector ccpSub firstTouchingPoint _arrow.position CGFloat firstRotateAngle ccpToAngle firstVector CGFloat previousTouch CC_RADIANS_TO_DEGREES.. firstRotateAngle ccpToAngle firstVector CGFloat previousTouch CC_RADIANS_TO_DEGREES firstRotateAngle CGPoint vector ccpSub touchingPoint _arrow.position CGFloat rotateAngle ccpToAngle vector CGFloat currentTouch CC_RADIANS_TO_DEGREES rotateAngle.. calcBezierCircle CCSprite inSprite_ withAngle float angle_ double speed 100 points per second CGPoint positionOffset ccpSub CCNode self.target .position self.position CCNode self.target .position is circle center double startAngle self calcAngle..