使用cocos2d 的
local contactListener = cc.EventListenerPhysicsContact:create()
contactListener:registerScriptHandler(onContact,cc.Handler.EVENT_PHYSICS_CONTACT_BEGIN)
local dispactcher = self.layer:getEventDispatcher()
dispactcher:addEventListenerWithSceneGraphPriority(contactListener,self.layer)
会报错 :getEventDispatcher() 为nil 求解决方法
