ConceptCreator/src/app/project/game-model/interactions/condition/GamesystemCondition.ts
sebastian 1ffc5c1ecf
All checks were successful
E2E Testing / test (push) Successful in 1m20s
GamesystemConditionEditor
2024-06-02 17:05:52 +02:00

21 lines
749 B
TypeScript

import {Gamesystem} from "../../gamesystems/Gamesystem";
import {State} from "../../gamesystems/states/State";
import {Condition} from "./Condition";
import {CharacterDependency} from "../CharacterDependency";
export class GamesystemCondition extends Condition {
targetGamesystem: Gamesystem<any, any> | undefined
requieredState: State<any> | undefined;
constructor(characterDependency: CharacterDependency, targetGamesystem: Gamesystem<any, any> | undefined, requieredState: State<any> | undefined) {
super(characterDependency);
this.targetGamesystem = targetGamesystem;
this.requieredState = requieredState;
}
validate(): boolean {
return this.targetGamesystem != undefined && this.requieredState != undefined;
}
}