修复box因缺少初始化报错问题

This commit is contained in:
yhh
2020-06-16 16:35:17 +08:00
parent 7f5b78f340
commit 447ea4efe4
18 changed files with 272 additions and 910 deletions

View File

@@ -55,9 +55,13 @@ class ColliderTriggerHelper {
return false;
});
this._previousTriggerIntersections.forEach(pair => this.notifyTriggerListeners(pair, false));
for (let i = 0; i < this._previousTriggerIntersections.length; i ++){
this.notifyTriggerListeners(this._previousTriggerIntersections[i], false)
}
this._previousTriggerIntersections.length = 0;
tempIntersections.forEach(value => this._previousTriggerIntersections.push(value));
for (let i = 0; i < tempIntersections.length; i ++){
this._previousTriggerIntersections.push(tempIntersections[i]);
}
this._activeTriggerIntersections.length = 0;
}