📜  删除事件 ondestroy playcanvas - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:48.986000             🧑  作者: Mango

代码示例1
pc.Entity.prototype.destroyOld = pc.Entity.prototype.destroy;
pc.Entity.prototype.destroy = function() {
    this.fire('beforedestroy', this);
    pc.Entity.prototype.destroyOld.apply(this);
}