level upgrade step
This commit is contained in:
+11
-2
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user