-(void)ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event
{
CGPoint location = [touch locationInView:[touch view]];
CGPoint convertedlocation = [[CCDirector sharedDirector] convertToGL:location];
bb=[CCMenuItemImage itemFromNormalImage:@"Aqua-ball.png" selectedImage:@"Aqua-ball.png" target:self selector:@selector(move:)];
menu1=[CCMenu menuWithItems:bb, nil];
//ignore this.....
}
-(void) move:(CGPoint) touch{
[character runAction:[CCMoveTo actionWithDuration:1 position:ccp(touch.x,touch.y)]];
}
我试图制作 CCmenuitem 选择器:@selector(move:converted location),但它似乎无法接受参数,是否有一些这样做我可以传递参数。