【问题标题】:cocos2d wheel spinning like wheel of fortunecocos2d 轮子像命运之轮一样旋转
【发布时间】:2011-03-01 06:55:38
【问题描述】:

我正在使用 cocos2d 开发纺车应用程序。
从顶视图可以看到轮子。
我可以旋转轮子(只有一个精灵)并停止旋转轮。

wheel = [CCSprite spriteWithFile:@"wheel500.png" rect:CGRectMake(0, 0, 500, 500)]; 
id spin = [CCRotateBy actionWithDuration:.5 angle: 360];
id spins = [CCRepeat actionWithAction:spin times:8];
[wheel runAction:spins];

轮子有 6 或 8 段。我想在所有段中添加文本(动态)。
感谢您的任何提示...

【问题讨论】:

    标签: iphone cocos2d-iphone


    【解决方案1】:

    将所有文本添加到轮子.. 意味着文本现在是轮子的子项.. 你完成了.. 无论父项(轮子)做什么,子项(文本)都会跟随..

    【讨论】:

      猜你喜欢
      • 2016-10-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-29
      • 1970-01-01
      相关资源
      最近更新 更多