0
我是新來的客觀C和iPhone遊戲開發。我在理解在cocos中實現觸摸的代碼時遇到一些困難。任何人都可以給我一些解釋嗎?觸及科科斯解釋
-(BOOL)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)events
{
UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInView: [touch view]];
CGPoint convertedLocation = [[Director sharedDirector] convertCoordinate:location];
lady.position = convertedLocation;
return kEventHandled;
}
請解釋一下這些代碼。我想知道它是如何工作的一行一行。 在此先感謝