CGRect rect = CGRectMake(sprites.boundingBox.origin.x, sprites.boundingBox.origin.y, sprites.boundingBox.size.width, scale);
如何将此 CGRect 分配给 CCSprite?
float scale = sprites.boundingBox.size.height * 1.2;
CGPoint point = CGPointMake(sprites.position.x,sprites.position.y + ((scale - sprites.boundingBox.size.height) / 2));
sprites.position = point;
[self resizeSprite:sprites toWidth:sprites.boundingBox.size.width toHeight:scale];
-(void)resizeSprite:(CCSprite*)sprite toWidth:(float)width toHeight:(float)height
{
sprite.scaleX = width / sprite.contentSize.width;
sprite.scaleY = height / sprite.contentSize.height;
}
如何为向上缩放的高度设置动画