7
này không hoạt động:Làm thế nào để có được kích thước CCSprite sau khi thay đổi quy mô
CCSprite *testscale=[CCSprite spriteWithSpriteFrame:starFrame];
testscale.scale=0.5;
float starWidth=testscale.contentSizeInPixels.width;
CCLOG(@"contentpixels: %f contentsize: %f",starWidth, testscale.contentSize.width);
Hai kết quả đầu ra trong CCLOG cả hiển thị kích thước điểm ảnh gốc của ma, không phải là kích thước sau khi mở rộng quy mô.
Có cách nào để có được nó mà không làm điều này ...
float displayWidth=starWidth*testscale.scale;