Files
Reeks2Missie9/scripts/Commandeer/nextLevel.ts
2024-08-07 09:45:15 +02:00

17 lines
241 B
TypeScript

class NextLevel {
currentState = 0;
states: Array<Function> = [];
constructor(states: Array<Function>) {
this.states = states;
}
update() {
this.states[this.currentState]();
}
next() {
this.currentState++;
}
}