@lsqlebai 写道:
pauseTarget: function (node, recursive) { if (!(node instanceof cc._BaseNode || node instanceof _ccsg.Node)) { cc.warn(cc._LogInfos.EventManager.addListener_5); return; } var listeners = this._nodeListenersMap[node.__instanceId], i, len; if (listeners) { for ( i = 0, len = listeners.length; i < len; i++) listeners[i]._setPaused(true); } if (recursive === true) { var locChildren = node.getChildren(); for ( i = 0, len = locChildren.length; i< len; i++) this.pauseTarget(locChildren[i], true); } },
Uncaught TypeError: Cannot read property 'length' of null
at Object.pauseTarget (CCEventManager.js:159)
engine v1.3 有拉新的代码 locChildren 这个可能要判空一下吧?
帖子: 1
参与者: 1