isolated-state-generation #39
@ -1,3 +1,4 @@
 | 
				
			|||||||
 | 
					<mat-checkbox [(ngModel)]="this.gamesystem!.generateIsolatedStates">Generate Isolated States</mat-checkbox>
 | 
				
			||||||
<app-product-state-editor [templateElement]="templateElement" [gamesystem]="gamesystem" (onOpenGamesystemEditor)="onOpenGamesystemEditor($event)"></app-product-state-editor>
 | 
					<app-product-state-editor [templateElement]="templateElement" [gamesystem]="gamesystem" (onOpenGamesystemEditor)="onOpenGamesystemEditor($event)"></app-product-state-editor>
 | 
				
			||||||
<div id="productStateEditor">
 | 
					<div id="productStateEditor">
 | 
				
			||||||
  <app-product-transition-editor [templateElement]="templateElement" [gamesystem]="gamesystem" (onOpenGamesystem)="onOpenGamesystemEditor($event)"></app-product-transition-editor>
 | 
					  <app-product-transition-editor [templateElement]="templateElement" [gamesystem]="gamesystem" (onOpenGamesystem)="onOpenGamesystemEditor($event)"></app-product-transition-editor>
 | 
				
			||||||
 | 
				
			|||||||
@ -16,6 +16,7 @@ import {IsolatedProductStateGenerator} from "./productSystemGenerator/IsolatedPr
 | 
				
			|||||||
export class ProductGamesystem extends Gamesystem<ProductState, ProductTransition> {
 | 
					export class ProductGamesystem extends Gamesystem<ProductState, ProductTransition> {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  innerGamesystems: Gamesystem<State<any>, Transition<any>>[] = [];
 | 
					  innerGamesystems: Gamesystem<State<any>, Transition<any>>[] = [];
 | 
				
			||||||
 | 
					  generateIsolatedStates: boolean = false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  static constructFromSimpleGamesystem(simpleGamesystem: SimpleGamesystem, gameModel: GameModel) {
 | 
					  static constructFromSimpleGamesystem(simpleGamesystem: SimpleGamesystem, gameModel: GameModel) {
 | 
				
			||||||
    const productGamesystem = new ProductGamesystem(simpleGamesystem.componentName, simpleGamesystem.componentDescription);
 | 
					    const productGamesystem = new ProductGamesystem(simpleGamesystem.componentName, simpleGamesystem.componentDescription);
 | 
				
			||||||
@ -76,8 +77,10 @@ export class ProductGamesystem extends Gamesystem<ProductState, ProductTransitio
 | 
				
			|||||||
    const productGenerator = new ProductSystemGenerator(this);
 | 
					    const productGenerator = new ProductSystemGenerator(this);
 | 
				
			||||||
    productGenerator.generateFromChildsystems();
 | 
					    productGenerator.generateFromChildsystems();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const isolatedStatesGenerator = new IsolatedProductStateGenerator(this);
 | 
					    if(this.generateIsolatedStates) {
 | 
				
			||||||
    isolatedStatesGenerator.generateIsolatedProductStates();
 | 
					      const isolatedStatesGenerator = new IsolatedProductStateGenerator(this);
 | 
				
			||||||
 | 
					      isolatedStatesGenerator.generateIsolatedProductStates();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  addChildGamesystem(gamesystem: Gamesystem<State<any>, Transition<any>>) {
 | 
					  addChildGamesystem(gamesystem: Gamesystem<State<any>, Transition<any>>) {
 | 
				
			||||||
 | 
				
			|||||||
@ -32,10 +32,14 @@ export class ProductTemplateSystem extends ProductGamesystem implements Template
 | 
				
			|||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      const productTemplateGenerator = new TemplateProductSystemGenerator(this, templateElement);
 | 
					      const productTemplateGenerator = new TemplateProductSystemGenerator(this, templateElement);
 | 
				
			||||||
      productTemplateGenerator.generateFromChildsystems()
 | 
					      productTemplateGenerator.generateFromChildsystems()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      if(this.generateIsolatedStates) {
 | 
				
			||||||
 | 
					        const isolatedTemplateStateGenerator = new IsolatedTemplateStateGenerator(this, templateElement);
 | 
				
			||||||
 | 
					        isolatedTemplateStateGenerator.generateIsolatedProductStates();
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const isolatedTemplateStateGenerator = new IsolatedTemplateStateGenerator(this, templateElement);
 | 
					
 | 
				
			||||||
    isolatedTemplateStateGenerator.generateIsolatedProductStates();
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user