init
This commit is contained in:
16
scripts/Commandeer/nextLevel.ts
Normal file
16
scripts/Commandeer/nextLevel.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
class NextLevel {
|
||||
currentState = 0;
|
||||
states: Array<Function> = [];
|
||||
|
||||
constructor(states: Array<Function>) {
|
||||
this.states = states;
|
||||
}
|
||||
|
||||
update() {
|
||||
this.states[this.currentState]();
|
||||
}
|
||||
|
||||
next() {
|
||||
this.currentState++;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user