0
내 장면에서 서로 다른 방향으로 이동하려는 두 개의 스프라이트가 있습니다. 나는 주변에서 검색하는 다음 방법을 시도했지만 아무것도 작동시킬 수 없습니다. 이것은 내가 지금까지 가지고있는 최고입니다. 누구나 손을 빌려 준다면 위대 할 것입니다.Cocos2d/spritebuilder에서 두 개의 CCSprites 이동
-(void)touchMoved:(UITouch *)touch withEvent:(UIEvent *)event
{
CGPoint touchLocation = [touch locationInNode:self];
if(CGRectContainsPoint([redLeash boundingBox], touchLocation))
{
redLeash.position = touchLocation;
}
else if
(CGRectContainsPoint([blueLeash boundingBox], touchLocation))
{
blueLeash.position = touchLocation;
}
}
답장을 보내 주셔서 감사합니다. 행운을 빌어 요. – user2800989