ccmenu在开发过程中是不能响应move事件的,但是我们如果想实现move功能呢?
我们需要创建一个ccmenu的子类,重写里面的
-(void) ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event
-(BOOL) ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event
-(void) ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event
-(void) ccTouchCancelled:(UITouch *)touch withEvent:(UIEvent *)event
-(CCMenuItem *) itemForTouch: (UITouch *) touch
方法即可。
或者说在里面加上一些标识