0

我正在尝试将子节点添加到精灵,然后使用CCProgressTimer它来逐渐显示它。但是在我的情况下,子节点CCLabelTTF根本没有出现在屏幕上。我只能看到testSprite.

CCSprite *testSprite = [CCSprite spriteWithFile:@"btnsmall-red-normal.png"];
CCLabelTTF *labeltest = [CCLabelTTF labelWithString:@"Testing123" fontName:@"Marker Felt" fontSize:64];
[labeltest setPosition:ccpMult( ccpFromSize(testSprite.contentSize), 0.5f )];
[testSprite addChild: labeltest];
CCProgressTimer *testPT = [CCProgressTimer progressWithSprite:testSprite];
[self addChild:testPT];
testPT.position = ccp(windowSize.width/2, windowSize.height/2+100);
testPT.percentage = 100;
4

0 回答 0