v3中addEventListener问题

我在v3中使用addEventListener报attempt to call method ‘addEventListener' <a nil value>是什么情况,网上有人说弃用了,

那要用什么方法代替,例子中用这个又是可以的。求解决
self.titleBoard = TitleBoard.new()
self.titleBoard:addEventListener(“GAME_OVER”, handler(self, self.onGameOver))
self:addChild(self.titleBoard)

self.titleBoard = TitleBoard.new()

cc(self.titleBoard)
self.titleBoard:addComponent(“components.behavior.EventProtocol”):exportMethods()

self.titleBoard:addEventListener(“GAME_OVER”, handler(self, self.onGameOver))
self:addChild(self.titleBoard)

这样?

这个对对对
:2:

原来这样啊,领教了~~~~