改变cocos2dx引擎速度

来源:互联网 发布:韩顺平java和java ee 编辑:程序博客网 时间:2024/06/08 00:12

整体改变:

<span style="white-space:pre"></span>[[CCScheduler sharedScheduler] setTimeScale:XX];


动态改变action速度:

       

        CCSprite *mySpriteByF =[CCSprite spriteWithSpriteFrameName:@"himi1.png"];        mySpriteByF.position=ccp(360,150);        [self addChild:mySpriteByF z:0 tag:66];         anim=[CCAnimation animationWithFrame:@"himi" frameCount:12 delay:0.1];         animate = [CCAnimate actionWithAnimation:anim];          seq =[CCSequence actions:animate, nil];        CCSpeed *speed =[CCSpeed actionWithAction:[CCRepeatForever actionWithAction:seq] speed:1.0f];         [speed setTag:88];        [mySpriteByF runAction:speed];        [self schedule:@selector(slowForHimi) interval:5];


http://blog.csdn.net/xiaominghimi/article/details/7009503




0 0
原创粉丝点击