0
我使用以下來交換2精靈的位置。cocos2d:交換雪碧
CCSprite *sprite1 = (CCSprite*)[self getChildByTag:tagOfFirstSprite];
CCSprite *sprite2 = (CCSprite*)[self getChildByTag:tagOfSecondSprite];
CGPoint SpritePosition1 = [sprite1 position];
CGPoint SpritePosition2 = [sprite2 position];
[sprite1 runAction:[CCMoveTo actionWithDuration:1.0 position:ccp(SpritePosition2.x, SpritePosition2.y)]];
[sprite2 runAction:[CCMoveTo actionWithDuration:1.0 position:ccp(SpritePosition1.x, SpritePosition1.y)]];
這些是box2d body.But它不工作.......任何想法??
請閱讀此主題以更好地理解此問題,http://www.cocos2d-iphone.org/forum/topic/6971 – Tayyab 2011-03-07 12:03:26
yes..雖然我已經發現它...但非常非常感謝您的美麗的說明.....我想你明確... – Rony 2011-03-08 04:05:36