我在cocos2D v3.00有一款游戏。在我添加arm64架构之前,一切都很好。现在,在64个设备上,每次我有一个CCButton回调方法时,发送者是UITouch,而不是32位的CCButton。
[编辑]
我的代码:
-(void)addButton
{
CCButton *myButton = [CCButton buttonWithTitle:@"[ Pause ]" fontName:@"Jet Set.ttf" fontSize:18.0f];
myButton.positionType = CCPositionTypeNormalized;
myButton.position = ccp(0.5f, 0.95f);
myButton.name = @"testbutton";
[myButton setTarget:self selector:@selector(myButtonPressed:)];
[self addChild:myButton];
}
-(void)myButtonPressed:(CCButton*)sender
{
NSLog(@"%s = %@", "sender", sender);
}
// 32Bits => sender = <CCButton = 0x17e0c180 | Name = button_1>
// 64Bits => sender = <UITouch: 0x1743841d0>
有没有办法解决它?
感谢。