ConceptCreator/src/app/project/game-model/gamesystems/states/SimpleState.ts
Sebastian Böckelmann 8016f55e85
Some checks failed
E2E Testing / test (push) Failing after 1m34s
Refactor Loading of ScriptAccounts
2024-03-20 09:26:14 +01:00

25 lines
626 B
TypeScript

import {State} from "./State";
import {SimpleTransition} from "../transitions/SimpleTransition";
import {Transition} from "../transitions/Transition";
export class SimpleState extends State<SimpleTransition> {
stateLabel: string = "";
stateDescription: string = "";
constructor(stateLabel: string, stateDescription: string) {
super();
this.stateLabel = stateLabel;
this.stateDescription = stateDescription;
}
equals(state: State<Transition<any>>): boolean {
if(!(state instanceof SimpleState)) {
return false;
}
return this.stateLabel === (state as SimpleState).stateLabel;
}
}