【问题标题】:CCLayerGradient tint toCCLayer渐变色到
【发布时间】:2014-04-04 19:37:37
【问题描述】:

如何将CCTintToCCLayerGradient 一起使用?当我在渐变层上使用默认的CCTintTo 操作时,只有一种颜色发生变化,但另一种颜色仍然相同。我怎样才能一起改变它们?

任何帮助。谢谢。

【问题讨论】:

    标签: ios iphone cocos2d-iphone cclayer


    【解决方案1】:
     try this:
    
     CCObject* child;
     CCARRAY_FOREACH(layer->getChildren(), child)
     {
        CCSprite* allSpriteChild = (CCSprite*) child;
        allSpriteChild->setColor(layer->getColor());
    
     }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-27
      • 1970-01-01
      • 1970-01-01
      • 2022-12-21
      相关资源
      最近更新 更多