AgentVerse's picture
first commit
670a607
raw
history blame contribute delete
480 Bytes
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;