Files
Reeks2Missie6/scripts/Commandeer/nextLevel.ts
Bram Verhulst 67af73c6b5 Init
2024-07-04 14:42:38 +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++;
}
}