level upgrade step

This commit is contained in:
azykov@mail.ru
2026-02-14 14:21:10 +03:00
parent 52f75c74c0
commit ef5caab748
5 changed files with 64 additions and 25 deletions
+11 -2
View File
@@ -16,15 +16,24 @@ export class Root {
public numberNotationName: keyof typeof Presets = 'Standard';
public numberNotation: Notation = Presets.Standard;
public upgradeStep: number | 'max' = 1;
constructor() {
this.copyGame();
this.setNumberNotation();
makeAutoObservable(this);
}
public setLastGameTime(value: number) {
this.lastGameTime = value;
this.lastGameTime = value;
}
public setUpgradeStep(value: number | 'max') {
if (typeof (value) === 'number')
this.upgradeStep = Math.min(value, 1000);
else
this.upgradeStep = value;
}
public tick(deltaTime: number): void {