【发布时间】:2011-05-19 19:21:26
【问题描述】:
我在我的项目中使用enableRetinaDisplay,它运行良好,除非我使用此代码。
//+++VRope
//create batchnode to render rope segments
CCSpriteBatchNode *ropeSegmentSprite = [CCSpriteBatchNode batchNodeWithFile:@"rope.png" ];
[game addChild:ropeSegmentSprite];
//Create two cgpoints for start and end point of rope
CGPoint pointA = ccp(73, 330); //Top
CGPoint pointB = ccp(self.position.x +5, self.position.y +30); //Bottom
//create vrope using initWithPoints method
verletRope = [[VRope alloc] initWithPoints:pointA pointB:pointB spriteSheet:ropeSegmentSprite];
此代码不是绘制一张绳索的高分辨率图像,而是绘制两张绳索图像。我知道是视网膜显示器导致了这种情况,因为我在 iphone 3gs 和模拟器上对其进行了测试,它工作得很好……直到我在我的 iphone 4 上对其进行测试,然后它会拉两条绳子而不是一根绳子。我是不是做错了什么?
【问题讨论】:
标签: cocos2d-iphone