我正在使用此代码添加 progressTimer 。但它没有显示在屏幕上。
CCSprite* sprite_HealthBar = [CCSprite spriteWithFile:@"green_health_bar.png"];
self.progressTimer = [CCProgressTimer progressWithSprite:sprite_HealthBar];
self.progressTimer.type = kCCProgressTimerTypeBar;
self.progressTimer.scale = 5;
self.progressTimer.percentage = 100;
self.progressTimer.position = ccp( winSize.width/2 , winSize.height/2 );
self.progressTimer.midpoint = ccp(0,0);
[self addChild:self.progressTimer z:2];