¡@

Home 

2014/10/15 ¤U¤È 10:03:29

iphone Programming Glossary: actionwithduration

How to approach -hd files

http://stackoverflow.com/questions/10232539/how-to-approach-hd-files

left then the right This creates the effect that we are moving to the right then the left CCMoveBy moveRight CCMoveBy actionWithDuration 5.0f position ccp 80 0 CCMoveBy moveLeft CCMoveBy actionWithDuration 2.5f position ccp 80 0 CCSequence sequence CCSequence.. right then the left CCMoveBy moveRight CCMoveBy actionWithDuration 5.0f position ccp 80 0 CCMoveBy moveLeft CCMoveBy actionWithDuration 2.5f position ccp 80 0 CCSequence sequence CCSequence actions moveRight moveLeft nil CCRepeatForever repeat CCRepeatForever..

UIScrollView and Cocos2D

http://stackoverflow.com/questions/2457380/uiscrollview-and-cocos2d

the sprites in my layer myImage.position ccp 53 coordinate.x 0.52 57 coordinate.y 1.45 myImage runAction FadeIn actionWithDuration 0.3 myImage.relativeAnchorPoint YES self addChild myImage z 1 The sprite is using the TouchesDispatcher and the touches..

Random Sprite Destinations

http://stackoverflow.com/questions/3817637/random-sprite-destinations

rangeDuration maxDuration minDuration int actualDuration arc4random rangeDuration minDuration id actionMove CCMoveTo actionWithDuration actualDuration position ccp 160 0 id actionMoveDone CCCallFuncN actionWithTarget self selector @selector spriteMoveFinished.. rangeDuration maxDuration minDuration int actualDuration arc4random rangeDuration minDuration id actionMove CCMoveTo actionWithDuration actualDuration position ccp target.contentSize.width 2 actualY id actionMoveDone CCCallFuncN actionWithTarget self selector.. be less confusing posted as another question but I'll answer it here anyway P Your line id actionMove CCMoveTo actionWithDuration actualDuration position ccp 160 0 is what tells the sprite where to move. If you want to randomise it you need to make sure..

CCMoveTo of Cocos2D

http://stackoverflow.com/questions/5734072/ccmoveto-of-cocos2d

convertedLocation CCDirector sharedDirector convertToGL location spriteA stopAllActions spriteA runAction CCMoveTo actionWithDuration 1 position convertedLocation it can be moved but not only four direction and how can i use spriteB stop spriteA if spriteB.. 0.0f else convertedLocation ccp 0.0f convertedLocation.y spriteA stopAllActions spriteA runAction CCMoveTo actionWithDuration 1 position convertedLocation Next you'll need to implement collision detection and see if the sprite at convertedLocation..

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

ccpSub endPoint positionOffset float bezierDuration radius fabsf bezierAngle speed id bezierTo CCBezierTo actionWithDuration bezierDuration bezier bezier id rotateBy CCRotateBy actionWithDuration bezierDuration angle CC_RADIANS_TO_DEGREES bezierAngle.. fabsf bezierAngle speed id bezierTo CCBezierTo actionWithDuration bezierDuration bezier bezier id rotateBy CCRotateBy actionWithDuration bezierDuration angle CC_RADIANS_TO_DEGREES bezierAngle CCAction bezierToAndRotateBy CCSpawn actions bezierTo rotateBy nil..