import { ProductGamesystem } from "./ProductGamesystem"; import { SimpleGamesystem } from "./SimpleGamesystem"; import { SimpleTemplateGamesystem } from "./SimpleTemplateGamesystem"; export class ProductTemplateGamesystem extends ProductGamesystem { referenceSystem: ProductGamesystem constructor(referenceSystem: ProductGamesystem) { super(referenceSystem.componentName, referenceSystem.componentDescription) this.referenceSystem = referenceSystem; this.innerGamesystems = referenceSystem.innerGamesystems.map(innerGamesystem => { if(innerGamesystem instanceof SimpleGamesystem) { return new SimpleTemplateGamesystem(innerGamesystem) } else { return new ProductTemplateGamesystem(innerGamesystem as ProductTemplateGamesystem) } }) this.generateFromChildsystems(); } }