重要關鍵字
EVENT_MOUSE_SCROLL
addEventListenerWithSceneGraphPriority
if IsPc() then --建立滑鼠監聽
local listener = cc.EventListenerMouse:create()
-- listener:registerScriptHandler(handler(self, self.mouseMove), cc.Handler.EVENT_MOUSE_MOVE)
listener:registerScriptHandler(handler(self, self.mouseScroll), cc.Handler.EVENT_MOUSE_SCROLL)
local dispatcher = cc.Director:getInstance():getEventDispatcher()
dispatcher:addEventListenerWithSceneGraphPriority(listener,self.roomList)
end