CharacterSpecific Templatesystems #36

Merged
sebastian merged 31 commits from template-systems into main 2024-04-14 13:45:04 +02:00
Showing only changes of commit 2c789b4cd0 - Show all commits

View File

@ -3,7 +3,6 @@ import {TemplateGamesystem} from "../TemplateGamesystem";
import {TemplateElement} from "../TemplateElement";
import {SimpleState} from "../../gamesystems/states/SimpleState";
import {SimpleTransition} from "../../gamesystems/transitions/SimpleTransition";
import {state, transition} from "@angular/animations";
import {SimpleTemplateState} from "./SimpleTemplateState";
import {SimpleTemplateTransition} from "./SimpleTemplateTransition";
import {TemplateType} from "../TemplateType";
@ -28,11 +27,13 @@ export class SimpleTemplateGamesystem extends SimpleGamesystem implements Templa
}
createState(label: string, description: string): SimpleState | undefined {
return new SimpleTemplateState(label, description);
const state = new SimpleTemplateState(label, description);
this.states.push(state)
return state;
}
createTransition(startingState: SimpleState, endingState: SimpleState): SimpleTransition | undefined {
return new SimpleTemplateTransition(startingState, endingState)
return new SimpleTemplateTransition(startingState, endingState);
}
removeState(state: SimpleState): boolean {