7
這不起作用後如何獲得CCSprite的大小:改變規模
CCSprite *testscale=[CCSprite spriteWithSpriteFrame:starFrame];
testscale.scale=0.5;
float starWidth=testscale.contentSizeInPixels.width;
CCLOG(@"contentpixels: %f contentsize: %f",starWidth, testscale.contentSize.width);
在CCLOG兩個輸出都表現出精靈的原始像素大小,不結垢後的尺寸。
有沒有辦法得到它沒有這樣做......
float displayWidth=starWidth*testscale.scale;