Cocos2d 2.0中“self.isTouchEnabled”的替代方法是什么?

当我使用

self.isTouchEnabled = YES 

Cocos2d v2.0的图层上可以触摸,Xcode给我提示:

 setIsTouchEnabled: is deprecated 

现在,我只想知道isTouchEnabled的替代方法。

这是新的代码:

  self.touchEnabled = YES; //In Cocos2d 2.0 self.userInteractionEnabled = YES; //In Cocos2d 3.0 

只是想知道为什么天才人(Cocos2d团队)做这种愚蠢的变化

但是这个是在Cocos2d 2.x及更高版本中设置触摸的正确方法!

看来setIsTouchEnabled现在位于“CCDeprecated.h”中。

以下方法在当前的“CCLayer.h”中:

 [self setTouchEnabled:YES]