2011-12-08 29 views
0
CCSprite butonSprite=CCSprite.sprite("magnet.png"); 
    CCLabel label1=CCLabel.makeLabel("START", "Arial", 30); 
    label1.setPosition(0,0); 
    butonSprite.addChild(label1); 

    ccMacros.CCLOG("", ""+butonSprite.getChildren()); 

    CCMenuItemSprite item=CCMenuItemSprite.item(butonSprite, butonSprite,this,"goToGameScreen"); 
    CCMenu menu=CCMenu.menu(item); 

只有精靈可見。如何使標籤可見?我試圖設置標籤的位置。如何將標籤或精靈添加到cocos2d android中的另一個精靈上?

+0

嘗試使用大小初始化標籤,並設置其顏色。 –

+0

我試圖設置顏色和大小,即使那麼標籤不可見:( – shruthi

回答

0

您的標籤可能是精靈的位置下方,試圖改變z排序比精靈

如的Z排序更大

[sprite addChild:label z:10];

+0

不工作..... – shruthi

相關問題