Spaces:
Build error
Build error
File size: 480 Bytes
670a607 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
class ObjectFactory {
constructor(scene) {
this.scene = scene;
this.displayList = scene.sys.displayList;
this.updateList = scene.sys.updateList;
scene.events.once('destroy', this.destroy, this);
}
destroy() {
this.scene = null;
this.displayList = null;
this.updateList = null;
}
static register(type, callback) {
ObjectFactory.prototype[type] = callback;
}
};
export default ObjectFactory; |