Quantcast
Channel: cocos2d for iPhone » Topic: Help, Balloon Movement (Actions)
Viewing all articles
Browse latest Browse all 2

Help, Balloon Movement (Actions)

$
0
0

Hello,

I want know, how I can do a Balloon Movement..

as you know the balloon, move to right and left

for now I have this>>

        float someDuration = 2.0f;

        id actionFloatLeft = [CCMoveBy actionWithDuration:someDuration position:ccp(70,0)];
        id actionFloatRight = [CCMoveBy actionWithDuration:someDuration position:ccp(-65,0)];
        id actionRotate = [CCRotateTo actionWithDuration:someDuration angle:15];

        
        [redBalloon runAction:[CCRepeatForever actionWithAction:[CCSequence actions:actionFloatLeft, actionRotate, actionFloatRight, nil]]];

Help

Thanks in advance


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images