0
我想出CCLabeTTF中的多行文本。我能夠。但我希望文本順利出現。爲此我使用動作CCFadeIn。 $ //多行輸出描述使用CCFadeIn在COCS2D中的多行文本標籤時出現問題
description =[descriptions valueForKey:@"text_MainHistory"];
float fontSize =22;
CGSize maxSize = {500, 400};
CGSize actualSize = [description sizeWithFont:[UIFont fontWithName:@"Arial" size:fontSize] constrainedToSize:maxSize lineBreakMode:UILineBreakModeWordWrap];
CGSize containerSize = {actualSize.width, actualSize.height};
descriptionText = [CCLabelTTF labelWithString:description dimensions:containerSize alignment:UITextAlignmentCenter fontName:@"Arial" fontSize:fontSize];
descriptionText.position = ccp(screenSize.width/2,screenSize.height/2);
descriptionText.color = ccc3(128, 64, 0);
[descriptionText runAction:[CCSequence actions:[CCFadeIn actionWithDuration:5.0f], nil]];
[self addChild:descriptionText z:2];
但在性能半秒出現和消失的文字,然後開始CCFadeIn。
我在哪裏錯了?