diff --git a/src/app/editor/gamesystem-editor/gamesystem-editor.component.html b/src/app/editor/gamesystem-editor/gamesystem-editor.component.html index 229e455..46624fe 100644 --- a/src/app/editor/gamesystem-editor/gamesystem-editor.component.html +++ b/src/app/editor/gamesystem-editor/gamesystem-editor.component.html @@ -1,4 +1,4 @@ + (onOpenGamesystemEditor)="onOpenGamesystemEditor($event)" [templateReference]="templateReference"> diff --git a/src/app/editor/gamesystem-editor/product-gamesystem-editor/product-gamesystem-editor.component.html b/src/app/editor/gamesystem-editor/product-gamesystem-editor/product-gamesystem-editor.component.html index b2d1a1f..98e42fe 100644 --- a/src/app/editor/gamesystem-editor/product-gamesystem-editor/product-gamesystem-editor.component.html +++ b/src/app/editor/gamesystem-editor/product-gamesystem-editor/product-gamesystem-editor.component.html @@ -1,4 +1,4 @@ - +
- +
diff --git a/src/app/editor/gamesystem-editor/product-gamesystem-editor/product-gamesystem-editor.component.ts b/src/app/editor/gamesystem-editor/product-gamesystem-editor/product-gamesystem-editor.component.ts index d1f7f23..08c8343 100644 --- a/src/app/editor/gamesystem-editor/product-gamesystem-editor/product-gamesystem-editor.component.ts +++ b/src/app/editor/gamesystem-editor/product-gamesystem-editor/product-gamesystem-editor.component.ts @@ -4,6 +4,7 @@ import { } from "../transition-editor/product-transition-editor/product-transition-editor.component"; import {ProductGamesystem} from "../../../project/game-model/gamesystems/ProductGamesystem"; import {SimpleGamesystem} from "../../../project/game-model/gamesystems/SimpleGamesystem"; +import {Character} from "../../../project/game-model/characters/Character"; @@ -15,6 +16,7 @@ import {SimpleGamesystem} from "../../../project/game-model/gamesystems/SimpleGa export class ProductGamesystemEditorComponent { @Input() gamesystem: ProductGamesystem | undefined + @Input() templateReference: Character | undefined @Output("onOpenGamesystemEditor") openGamesystemEditorEmitter = new EventEmitter(); onOpenGamesystemEditor(gamesystem: SimpleGamesystem) { diff --git a/testModel/characters/New Character.json b/testModel/characters/New Character.json index ca7cd7e..8e15e5e 100644 --- a/testModel/characters/New Character.json +++ b/testModel/characters/New Character.json @@ -4,13 +4,49 @@ "characterSpecificGamesystems": [ { "componentName": "SimpleTemplate 1", - "states": [], - "transitions": [] + "states": [ + { + "stateLabel": "1", + "conditionMap": [] + }, + { + "stateLabel": "2", + "conditionMap": [] + } + ], + "transitions": [ + { + "scriptAccountActions": [], + "scriptAccountConditions": [], + "startingState": "1", + "endingState": "2", + "conditionMap": [], + "actionMap": [] + } + ] }, { "componentName": "SimpleTemplate 2", - "states": [], - "transitions": [] + "states": [ + { + "stateLabel": "A", + "conditionMap": [] + }, + { + "stateLabel": "B", + "conditionMap": [] + } + ], + "transitions": [ + { + "scriptAccountActions": [], + "scriptAccountConditions": [], + "startingState": "A", + "endingState": "B", + "conditionMap": [], + "actionMap": [] + } + ] } ] } \ No newline at end of file diff --git a/testModel/gamesystems/ProductTemplate/SimpleTemplate 1.json b/testModel/gamesystems/ProductTemplate/SimpleTemplate 1.json index f8435a5..93d355c 100644 --- a/testModel/gamesystems/ProductTemplate/SimpleTemplate 1.json +++ b/testModel/gamesystems/ProductTemplate/SimpleTemplate 1.json @@ -1,7 +1,28 @@ { "componentName": "SimpleTemplate 1", "componentDescription": "", - "states": [], - "transitions": [], + "states": [ + { + "initial": false, + "conditions": [], + "stateLabel": "1", + "stateDescription": "" + }, + { + "initial": false, + "conditions": [], + "stateLabel": "2", + "stateDescription": "" + } + ], + "transitions": [ + { + "scriptAccountActions": [], + "scriptAccountConditions": [], + "startingState": "1", + "endingState": "2", + "actionMap": {} + } + ], "templateType": 1 } \ No newline at end of file diff --git a/testModel/gamesystems/ProductTemplate/SimpleTemplate 2.json b/testModel/gamesystems/ProductTemplate/SimpleTemplate 2.json index f55b0a8..2b10735 100644 --- a/testModel/gamesystems/ProductTemplate/SimpleTemplate 2.json +++ b/testModel/gamesystems/ProductTemplate/SimpleTemplate 2.json @@ -1,7 +1,28 @@ { "componentName": "SimpleTemplate 2", "componentDescription": "", - "states": [], - "transitions": [], + "states": [ + { + "initial": false, + "conditions": [], + "stateLabel": "A", + "stateDescription": "" + }, + { + "initial": false, + "conditions": [], + "stateLabel": "B", + "stateDescription": "" + } + ], + "transitions": [ + { + "scriptAccountActions": [], + "scriptAccountConditions": [], + "startingState": "A", + "endingState": "B", + "actionMap": {} + } + ], "templateType": 1 } \ No newline at end of file