mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-05 19:12:40 +08:00
Made removeListeners work for Entity
This commit is contained in:
@@ -796,7 +796,7 @@ cc.eventManager = {
|
||||
*/
|
||||
removeListeners: function (listenerType, recursive) {
|
||||
var i, _t = this;
|
||||
if (listenerType instanceof _ccsg.Node) {
|
||||
if (listenerType.__instanceId !== undefined) {
|
||||
// Ensure the node is removed from these immediately also.
|
||||
// Don't want any dangling pointers or the possibility of dealing with deleted objects..
|
||||
delete _t._nodePriorityMap[listenerType.__instanceId];
|
||||
|
||||
Reference in New Issue
Block a user