按钮和菜单在屏幕上,但按下按钮时没有任何反应: CCMenuItemImage *menuB = [CCMenuItemImage itemFromNormalImage:@"menuB.png" selectedImage:@"menuB.png" target:self selector:@selector(goMenu:)]; CCMenuItemImage *tryAgainB =
CCMenuItemImage *menuB = [CCMenuItemImage itemFromNormalImage:@"menuB.png" selectedImage:@"menuB.png" target:self selector:@selector(goMenu:)]; CCMenuItemImage *tryAgainB = [CCMenuItemImage itemFromNormalImage:@"tryAgainB.png" selectedImage:@"tryAgainB.png" target:self selector:@selector(tryAgain:)]; CCMenuItemImage *menuGoodByeT = [CCMenuItemImage itemFromNormalImage:@"menu.png" selectedImage:@"menu.png" target:self selector:@selector(nothing:)]; menuB.position=ccp(-65,-40); tryAgainB.position=ccp(15,-40); menu = [CCMenu menuWithItems:menuGoodByeT,menuB,tryAgainB, nil]; menu.isTouchEnabled = YES; [self addChild: menu];
是的,该方法具有:id sender.
这个菜单怎么了?它有些总是有问题.
好吧,我想我明白了 – >你在哪里坚持这段代码?
在 – (void)onEnter {???如果是这样,请检查您是否已调用[super onEnter].否则,你会遇到很多问题
其次,如果那不起作用,那么检查是否还有其他任何东西,因为你的菜单可能在另一层后面